saurabh0719 / elara

Elara DB is an easy to use, lightweight persistent key-value store that can also be used as a fast in-memory cache. Manipulate data structures in-memory, encrypt database files and export data. :dart:

Home Page:https://pypi.org/project/elara/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Re-architect the cache mechanism to track max_size, max_age and cull_freq

saurabh0719 opened this issue · comments

Description :

  • Update the architecture to maintain an access list (using the LRU) to set default max_age of the cache and track max_age of each individual key-value pair.
  • Also track the max_size of the cache and allow the user to set the default cull_freq (cull frequency - percentage of key-value pairs to be deleted when cache reaches it's max_size)
  • Update cache (resolve max_age and LRU) after every operation. (set, get etc. etc.)
  • Allow set() to take individual max_age for key-value pairs.