MichaCo / CacheManager

CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
http://cachemanager.michaco.net
Apache License 2.0
2.33k stars 457 forks source link

Using multi-level cache, with 2nd level to disk #321

Closed taebae027 closed 3 years ago

taebae027 commented 3 years ago

Hi,

I apologize in advance if this has been answered elsewhere or is available in the documentation, but i haven't been able to find the answer.

I'm looking to create a two-tiered cache with the first being in memory and the second stored in disk (i.e. FileCache, which extends System.Runtime.Caching.ObjectCache) Is there a way to do this? Any help would be appreciated.

Thanks.

MichaCo commented 3 years ago

Hi @taebae027, Did you figure something out so far?

This is more a conversation then an issue.

My suggestion would be to write your own, file based, cache handle, which does exactly what you need with your file types and data structures.

ndrwrbgs commented 3 years ago

The FileCache package has some limits on key length and contents so (shameless plug) I made a sqlite version to handle disk caching. Try FileCache first (it's more widely used) but don't feel you need to write your own (unless you wish to!).

On Sun, Dec 20, 2020, 6:37 AM MichaC notifications@github.com wrote:

Hi @taebae027 https://github.com/taebae027, Did you figure something out so far?

This is more a conversation then an issue.

My suggestion would be to write your own, file based, cache handle, which does exactly what you need with your file types and data structures.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MichaCo/CacheManager/issues/321#issuecomment-748602445, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSHCOSKYQE5AQZNZNVYYK3SVXVY7ANCNFSM4QEGGPAQ .