Re: Class::DBI::Cacheable CACHE_ROOT setting

[prev] [thread] [next] [Date index for 2005/04/08]

From: Cees Hek
Subject: Re: Class::DBI::Cacheable CACHE_ROOT setting
Date: 15:03 on 08 Apr 2005
On Apr 8, 2005 10:56 AM, d. Taylor Singletary <taylor@xxxxxxxx.xxx> wrote:
> package ssr::DBI::Cacheable;
> use base 'Class::DBI::Cacheable';
> ssr::DBI::Cacheable->connection('dbi:mysql:yyy-nnn', 'xxx', 'xxx');
> __PACKAGE__->CACHE_ROOT('/tmp/new_cache_directory');
> 
> However, it never uses the /tmp/new_cache_directory. Permissions on the
> directory are the same as the default cache directory it is using.
> 
> The documentation says:
> USE A DIFFERENT CACHE_ROOT FOR EACH APPLICATION
> 
> By overriding CACHE_ROOT in the base class used to connect to your
> database, you can indicate a separate cache directory for each of your

Override usually means override a method so maybe putting something
like this in your base class will work:

sub CACHE_ROOT {
    return '/tmp/new_cache_directory';
}

Cheers,

Cees

Class::DBI::Cacheable CACHE_ROOT setting
d. Taylor Singletary 14:56 on 08 Apr 2005

Re: Class::DBI::Cacheable CACHE_ROOT setting
Cees Hek 15:03 on 08 Apr 2005

Re: Class::DBI::Cacheable CACHE_ROOT setting
d. Taylor Singletary 15:08 on 08 Apr 2005

Generated at 12:49 on 16 Apr 2005 by mariachi v0.52