Yes, that is a possibility. I like the cache because it has already figured out/coded how to do the aging process.
But that brings up a fundamental question. "How well is the Object Oriented(OO) pattern supported within Perl Threads?" There must be a fundamental problem with objects memory management within the "shared" thread.
While a hash, and thread to do the purging of expired entries might solve this specific problem; what about the general case? Might there be a "thread space" qualifier, just like a "name space" qualifier? This is a reference to the "rootthread::Cache::Cache" object... |