4 ms·
This is maybe a pretty half-baked idea, but could a language that supports partial evaluation replace a pretty significant chunk of most web app caching systems
by frankus 18y ago
This is maybe a pretty half-baked idea, but could a language that supports partial evaluation replace a pretty significant chunk of most web app caching systems?
I guess the tricky part is that side effects (e.g. another process modifying the database) are pretty much unavoidable with current architecture.
- eelco 18y agoNot really. Caching is (in my understanding) mainly about reducing (disk) I/O, which is very slow. This is a database/persistence problem more than a programming languague problem. Partial/lazy evaluation prevents looking up things you don't need, but doesn't solve the problem of getting what you need as fast as possible.
- rcoder 18y agoCaching is also very much not limited in usefulness to I/O-bound operations; a cache hit can save a great deal of CPU time, too, if you have difficult-to-compute values that are sufficiently static to be worth caching. Even if your whole dataset fits into RAM, you may still have that one O(2^N) algorithm that doesn't need to be run for every request. Voila! A perfect application for caching.