maldworth / cachemanager.filecaching Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
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
Not sure why CacheManager
doesn't infer this from the ctor
using ICacheSerializer serializer
, but it gives a little better feedback when the attribute is present
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.
Since there isn't an implementation of CacheBackplane
(and FileCache
library doesn't expose update events based on, e.g. FileSystemWatcher
), it would seem there isn't a way to actually use the Handle as a backplane source
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 ❤️
/// <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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.