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).
The CacheTempData
package is available at NuGet. To install CacheTempData
, run the following command in the Package Manager Console:
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.
- 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
- Initial release
Please report issues if you find any. Pull requests are welcome for documentation and code.