Luis,
I think this is going to boil down to how we want to define the behavior
of the cache.
The first question is, when you place something in the cache, is there
any guarantee that it will exist at a later date? I know we have the
timeout attribute, which can be set to zero-- but should the cache be
viewed as non-volitile? OR maybe a better question is what gets the
higher priority, cache persistence or system performance. It is
theoretically possible to load the cache with so many items with a
timeout of 0 that you consume all memory because none of them are ever
reaped.
So, would it be fair that if you wish to place an item in the cache, the
cache is full, AND nothing can be successfully evicted, you would not be
allowed to place that item in the cache at all?
Personally I think it would be fair to require code using the cache to
check for the existence of an item prior to using it, but I don't know
that everyone would agree with that. Other than the inconvenience, that
could be a real problem if the object in the cache needed to save state.
Should the cache keep a separate pool/max setting for the transient
items than it uses for the items which never expire?
~Brad