ASP.NET Page.Cache vs. Page.Application repository for data synchronization?

Both Page.Cache and Page.Application can store applications “global” data shared between requests and threads.

How should you choose a storage area compared to others considering data synchronization scenarios in a multi-threaded ASP.NET environment?

Looking for best practices and expert advice.

+3
source share
2 answers

If the data

  • stable for the duration of the application
  • should always be accessible and should not be cleaned

HttpApplicationState.

  • .
  • (, )
  • ,
  • / ( : , , ,...)

Cache.

:

  • , , .
  • . PageApplication .

. etutorials.org.

+4

Page.Application Items Collection, , . Page.Cache , .

0

Source: https://habr.com/ru/post/1747385/


All Articles