Coder Social home page Coder Social logo

cachemanager.filecaching's People

Contributors

maldworth avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cachemanager.filecaching's Issues

Sliding expiration does not work properly

The problem is that FileCache uses AbsoluteExpiration only to try to figure out when to evict, but CacheManager allows Sliding along with calling AddInternalPrepared with LastAccessedUtc set on reads.

We could try to manage that here by updating AbsoluteExpiration for FileCache in FileCacheHandle.GetPolicy, or FileCache would have to implement support for Sliding (which would require moving LastAccessedUtc out of the cache item and into the policy for performance, I think) CC: @acarteas

Add repo topics

Some obvious like CacheManager FileCaching, but I kept using File and FileCache to try to find an implementation like that, if either of those were alluring also.

Expose `_cache` property

The FileCache _cache property exposes the functionality of FileCache (like max cache size, accesstimeout, ShrinkCacheToSize) that might be beneficial to have accessible in some way. Unfortunately, CacheManager library won't give me the Handle directly (I have to access it via the list of handles) anyway, so since I already have to do an unsafe case to get FileCacheHandle, it might not be that much worse to just use Reflection to get _cache, so I'd consider this a definitely "feature request"/"what do you think" rather than anything like a bug report.

BTW thank you for making this. I've wanted it for a couple years for devbox testing, finally got around to making my own (rough draft) today, just to find this implementation FINALLY ❤️

`.Count` returns byte size instead of "number of items"

    /// <summary>
    /// Gets the number of items the cache handle currently maintains.
    /// </summary>
    /// <value>The count.</value>
    public abstract int Count { get; }

I think the bytes is useful to expose, but seems to violate the contract. I'd actually like the whole FileCache exposed personally :) but I'll open a separate issue for that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.