RE: [coldbox:3073] Re: CacheManager: Cannot find LastAccessTimeout key in struct

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

yea, I think I am coming with the realization that timeouts of 0 means that it can be eternal but evicted. Now if you don’t want something evicted but acting as a singleton, then use the application storage plugin.

So I agree with the policies safe guarding the cache, this is how all other cache implementations work anyways.

So I think it will stay like this for 3.0.0 and just comment on the compatibility guide that the cache now works this way.

Hi guys,

I am revisiting the timeout = 0 issue once again.

After much careful thought, the idea of 0 timeout, means that you can
create ETERNAL objects that could live until the cache is destroyed.
So in all reality, they should be excluded from the evictions.

Now, here is the question, you could potentially increment forever if
you use eternal, but I guess that is ok, because the behavior is that
they ARE ETERNAL, much like a scope.

Does this make sense?