Caching today: what do you use (or not)?

I’ve always been a big fan of cache. Cache at every level has been my mantra. With ASP.NET Core (2), I’m curious what levels people still cache or not.

I have in the past (and in some cases still today):

1) Response Headers. Pretty obvious one that everyone should do if possible.

2a) Response Cache: In some high volume requests, even a 1 second cache can make a huge difference.

2b) Output Caching: An exceptional feature of WebForms that was pretty difficult to master.

3) Process Caching: Potentially longer running processes that are more than just data related. Some difficulty with synchronization here, but definitely solvable. Tasks and async make this better. ๐Ÿ™‚

4a) EF Query Caching: It’s possible to write a .FromCache() extension for EF that uses the underlying SQL as the cache key. ๐Ÿ™‚

4b) Data Caching: Simply storing the data in memory via key/value pair.

5) Distributed Cache: Redis or other?

Anything I missed? What timeouts is everyone using for most cases?

submitted by /u/electricessence
[link] [comments]

Leave a Reply