time based lru and mru for postgresql