I am trying to set up multiple configurations for the Memcache engine
to allow for varying caching periods in CakePHP 1.2.5. I have set up
the following:

Cache::config(
        'long',
        array(
                'engine' => 'Memcache',
                'duration'=> 100800,
                'probability'=> 100,
                'prefix' => Inflector::slug(APP_DIR) . '_',
                'servers' => array(
                        '127.0.0.1:11211'
                ),
                'compress' => false,
        )
 );

 Cache::config(
        'short',
        array(
                'engine' => 'Memcache',
                'duration'=> 60,
                'probability'=> 100,
                'prefix' => Inflector::slug(APP_DIR) . '_',
                'servers' => array(
                        '127.0.0.1:11211'
                ),
                'compress' => false,
        )
 );

 Cache::config(
        'mid',
        array(
                'engine' => 'Memcache',
                'duration'=> 3600,
                'probability'=> 100,
                'prefix' => Inflector::slug(APP_DIR) . '_',
                'servers' => array(
                        '127.0.0.1:11211'
                ),
                'compress' => false,
        )
 );

The problem I am running into is that when I try to access cached data
with Cache::read('key', 'long') or Cache::read('key', 'short') it
defaults to the settings for 'mid', the last defined Cache::config, so
I am unable to access the data.

Anyone see anything I am doing wrong here, or is this a bug in the
core here?

--

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=.


Reply via email to