leocharre has asked for the wisdom of the Perl Monks concerning the following question:

I was looking over Cache::Memory, and wondering- when would someone use something like this- I mean- instead of simply storing directly to an object for example?

Is it because you could provide a timeout on validity of data? Is that the main advantage?

Would this be used in something like a daemon process?

  • Comment on any examples of Cache::Memory implementation?

Replies are listed 'Best First'.
Re: any examples of Cache::Memory implementation?
by kyle (Abbot) on Dec 23, 2008 at 19:11 UTC

    I doubt I'd use this, but the uses might be:

    • Data expiration (as you say).
    • It gives you a singleton without having to write one yourself or create a global variable.
    • It can be used as a stand-in for a slower, more persistent Cache::Cache module during development or testing.