Arc Forumnew | comments | leaders | submitlogin
1 point by palsecam 5523 days ago | link | parent

1. nilsym over nilcache: because I prefer to have only one table to store all the cached values. And I suppose it makes the code shorter. And maybe more efficient. And it's a new approach, and I like new things.

2. In your case you could actually set cach.key to nilsym to avoid that. I suppose you mean "set cach.key to (the real) nil (to actually delete the entry)"

3. I've been thinking about more global policies than deleting individual keys. Me too. As I said, this is just a draft. For instance, '(fstat)-cache-reaper is a common pattern, it needs to be automated, you should not write it manually.

4. delete the least recently used (LRU) element. Was this what you meant by the FIFO mechanism above? Yes.

5. A function to clear the cache. Yes, good idea. See above, as I said, ...-cache-reaper is a common pattern.



2 points by akkartik 5523 days ago | link

Ah, I totally missed your reaper thread when I wrote http://arclanguage.org/item?id=10699

I suppose you mean "set cach.key to (the real) nil"

Yep :}

-----