jeudi 25 février 2021

How to clear expired data in cache?

I implemented an ExpireLRUCache class, which will clear the data when it's times out. There are two ways to achieve this.

  1. Use a timer to clear the expire data
  2. Call the clean function in Add and Get

So, which implementation is better?

Aucun commentaire:

Enregistrer un commentaire