Skip to content

Session resets on refresh when Session.save is set to 'cache' #101

@ghost

Description

Created by Kim Biesbjerg, 19th Jan 2010. (originally Lighthouse ticket #17):


Session resets on refresh when Session.save is set to 'cache'. This is also an issue on Cake 1.2.

core.php:

Configure::write('Session.save', 'cache');
//Configure::write('Session.table', 'cake_sessions');
Configure::write('Session.cookie', 'CAKEPHP');
Configure::write('Session.timeout', '120');
Configure::write('Session.start', true);
Configure::write('Session.checkAgent', false);
Configure::write('Security.level', 'low');
$cacheOptions = array('engine' => 'Apc', 'prefix' => Inflector::slug($_SERVER['HTTP_HOST']));
Cache::config('default', $cacheOptions);

I have Session added to the AppController's components and helpers array.

If I write to the session from the controller, refresh the page, and check the session - it's empty.

It also happens if Cache engine is File or Memcache.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions