A normal LRU cache or implement it reference to a research paper?
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных