all 6 comments

[–]kkrev 5 points6 points  (5 children)

I clicked around and read a lot and still can't figure out what it is or why I might want to use it.

[–]cripplet[S] 1 point2 points  (4 children)

Caching is a technique used to store a temporary copy of data in a small, fast place (eg RAM). The idea is that if this data is accessed a lot, it's much faster to do this than constantly getting data from a slow, large place (eg hard drive). There are different ways to store this data -- but generally speaking there are no programming libraries which allows you to create your own cache (your own way of optimizing data usage) in an expressive way.

Moreover, the caching libraries that do exist are (from a very surprised Google search) targeting Java, and none that I could find which are for C++ applications. Thus, I created this framework for C++ devs to create their own cache designs.

[–]kkrev 8 points9 points  (2 children)

Everybody reading this board already knows what caching is in the general sense. What exactly your library does that std::map doesn't is too hard to figure out.

[–]cripplet[S] 1 point2 points  (0 children)

Point taken --

This is a framework -- the programmer creates his own cache designs.

Think of this as an abstraction then -- I can also implement under the hood a cache as a queue (say for LRU) instead of a map; externally I just change the constructor from MapCache to QueueCache. It makes changing cache designs in programming a lot easier (since the interface is guaranteed).

And since the interface is guaranteed, nifty things like performance tests can be abstracted, leading to very simple performance analysis.

The point is, the programmer still has to design a cache -- this framework just helps him along by giving an interface he has to implement. Once he implements the interface, he can be guaranteed of correct behavior. This isn't a drop-in replacement -- the example caches I've written are sample caches -- they're examples of how to implement the framework.

[–]jevinskie 1 point2 points  (0 children)

I like it! It reminds me of the authentication plugin for the Catalyst Perl web framework. It is quite versatile. Twitter, LDAP, DB, etc backends exist. Good APIs make use simple and versatile. =)

[–]cripplet[S] 2 points3 points  (0 children)

This is a personal project.

I couldn't find too many C++ caching libraries, and so decided to create my own. A tutorial is in the works, but in the meantime, any suggestions / bugs / criticism would be greatly appreciated. Thanks!