Git Product home page Git Product logo

cache's People

Contributors

m-renaud avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cache's Issues

Test and have EntryLocking concurrency policy reviewed.

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.

Convert PolymorphicCache to use policies.

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.

Restructure code.

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.

Make interface conform to standard associative containers.

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:

  • Keep the behaviour as is (same as lookup()), which is not how it behaves in std::map
  • Add a policy that dictates what should happen if the key does not exist (default construct a value?)
  • Don't provide operator[]

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.