CacheTempData
CacheTempData
is an ObjectCache-based TempData provider for ASP.NET MVC. The default ITempDataProvider
implementation included in ASP.NET MVC uses SessionState
. One of the problems with SessionState
is that it blocks concurrent ajax requests. CacheTempData
solves this problem by storing TempData
in MemoryCache
(or any other ObjectCache
implementation).
Installation
The CacheTempData
package is available at NuGet. To install CacheTempData
, run the following command in the Package Manager Console:
Install-Package XperiCode.CacheTempData
Documentation
There are multiple ways to use an alternative ITempDataProvider
implementation in your ASP.NET MVC application. Jonathan George wrote a nice article on the subject. You can also checkout the Sample application on GitHub.
Release notes
v0.9.1
- Removed constructor dependency on
HttpContextBase
- Changed Microsoft.AspNet.Mvc dependencies to 5.0.0 (5.2.2 was unnecessary)
-
TempData
is now removed from cache when no values are saved
v0.9.0
- Initial release
Collaboration
Please report issues if you find any. Pull requests are welcome for documentation and code.