matthiasmullie / scrapbook

PHP cache library, with adapters for e.g. Memcached, Redis, Couchbase, APC(u), SQL and additional capabilities (e.g. transactions, stampede protection) built on top.
https://www.scrapbook.cash
MIT License
315 stars 27 forks source link

Buffered cache can fill op memory #1

Closed matthiasmullie closed 9 years ago

matthiasmullie commented 9 years ago

Actually, so can Memory (adapter) & Transactional cache, but there it's ok.

Buffered cache, however, should be a FIFO. When memory is filling up, it should just dispose of the least recently requested values. Make sure it doesn't affect transactional cache, though - can't discard values that have yet to be written to cache.

matthiasmullie commented 9 years ago

First step: 9bc4a9f68f2f97e61334f492c0b9de81371f0a61 Now buffer & transactional have to be split up (the latter can't evict items from cache)

matthiasmullie commented 9 years ago

Fixed with c950fdfc8e8a0484afd92ec7d5724054cddd2819