m-renaud / cache Goto Github PK
View Code? Open in Web Editor NEWA general purpose cache for storing objects to disk with standard container like syntax.
A general purpose cache for storing objects to disk with standard container like syntax.
The per-entry locking concurrency policy may have bugs in it's current state. It should be thoroughly tested for both correctness and efficiency, as well as be reviewed by some other programmers to ensure that there isn't anything that was missed.
Currently, PolymorphicCache does not use policy-based design. Once the Cache class has all of the bugs worked out, porting the polymorphic version should be relatively simple.
Currently, all the code lives in the same directory. Ideally, the policies should be separated in to appropriate sub-directories, and the cache code should live in an include/
directory.
To add a new entry to the cache, the member function should be insert(std::pair<key,value>), not create(key, value). I'm not entirely sure why I named it that in the first place.
Additionally, there is currently no find() function. The desired behaviour for this would be to return a shared_ptr
to the object, with nullptr
being returned if it doesn't exist in the cache or on disk, exactly the behaviour of operator[]
currently. This also involves adding a typedef for an iterator that conforms to the standard containers.
Lastly, operator[]
does not act like the associative containers. The options that I can think of now are either:
std::map
operator[]
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.