in reply to Re: Re: mod_perl and sessions
in thread mod_perl and sessions

If you make sure to generate a new ID for every search then it should work. Personally, I would just use the combined search params as an ID, but it doesn't make much difference.

Cache::Cache offers a concept of expiration, which I think CGI::Session does as well. Cache::Cache can handle multiple namespaces for caching different kinds of things, which could be an advantage. For example, you could set different expirations or clear out all the cached data from one section without touching the other cached stuff.

Replies are listed 'Best First'.
Re: Re: Re: Re: mod_perl and sessions
by glwtta (Hermit) on Jun 11, 2003 at 22:20 UTC
    I would just use the combined search params as an ID, but it doesn't make much difference.

    The search parameters are pretty much what I am trying to cache - I am not caching the actual search results just the query I would need to run (with the newly provided LIMIT and OFFSET); The running time for these queries is more than acceptable, but they are verbose enough that passing them around via query strings can quickly become unwieldy.

    Thanks for your help though, I'll definitely give Cache::Cache a look. One feature I really like that it seems to be missing is database backends (Postgres specifically).