Can someone explain the difference between clearing and expiring an
object in the cacheBox cache? The description in the docs are too
vague to tell me what's really going on:
public void expireObject(any objectKey)
Expires an object from the cache by using its cache key. Returns false
if object was not removed or did not exist anymore (if supported by
public boolean clear(any objectKey)
Clears an object from the cache by using its cache key. Returns false
if object was not removed or did not exist anymore
Nowhere in the wiki could I find a definition of how clearing and
Clearing removes the object and stats immediately. Expiration marks them for death. They will be removed completely on the next reaping iteration.
This is only valid for the cache box provider
Ortus Solutions, Corp
Toll free phone/fax: 1-888-557-8057
Is there a benefit to one over the other? If an item is expired, a
lookup will fail, and I can regenerate the cached key, correct? If so,
am I better off just expiring and letting the normal reaping take care
of things, or do I need to .clear() the key to make sure that the next
request will regenerate the key?
I would recommend clearing directly.
Thanks, I appreciate the quick response.