sql >> Databasteknik >  >> NoSQL >> Redis

Använder redis som en LRU-cache för postgres

I pseudokod:

see if redis has the record by 'record_type:record_id'
if so return the result
if not then query postgres for the record_id in the record_type table
store the result in redis by 'record_type:record_id'
return the result

Detta kan behöva vara en anpassad adapter för frågemotorn som du använder.




  1. MongoDB Ersätt specifika matrisvärden

  2. konvertera iso-datum till tidsstämpel i mongo-fråga

  3. Custom Cascading in Spring Data MongoDB

  4. Cachar JSON-objekt på serversidan