Given that it's one of the hard things in computer science, does anyone know of a way to set up a plugable caching strategy?
What I'm thinking of would allow me to write a program with minimal thought as to what needs to be cached (e.i. use some sort of boiler-plate, low/no cost pattern that compiles away to nothing anywhere I might want caching) and then when things are further along and I know where I need caching I can add it in without making invasive code changes.
As an idea to the kind of solution I'm looking for; I'm working with the D programing language (but halfway sane C++ would be fine) and I like template.
The nearest thing which comes to my mind is memoization for pure functions. Maybe also interesting for you might be this book Pattern Oriented Software Architecture Patterns Management which has caching pattern in it.
there's a c++0x solution to generic automatic memoization (see answer here: What are reasonable ways to improve solving recursive problems? )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With