3 ms·
You can cache cache that in-memory! Because you've got a persistent app server.
by ilyak 17y ago
You can cache cache that in-memory! Because you've got a persistent app server.
- jrockway 17y agoHow do you know when to invalidate the cache without doing a scan over all the files? (Answer: hope your filesystem updates the directory change time when a file inside changes, or that your app server is inotify-ed of the change. Both are more complicated than querying a database. If I used KiokuDB for Angerwhale, it would only take me one key lookup for things that currently involve traversing the directory tree. Caching is nice, but it is not the solution to all problems.)
- ilyak 17y agoYou know when you update your data. Therefore, you invalidate your cache when you update your data. Timestamps help alot if you're paranoid, also.