CakePHP Session Helper Bug?

Posted by Matt on Sat, Feb 03 2007

According to everything I've read I should be able to wrap the CakePHP session helper in nocache tags and have dynamic areas on cached pages. But this doesn't work at all.

Digging through the code I don't see how this could possible work. The session helper doesn't start the session, only the session component does. But with cached views the session component is never called - that's the point of caching - avoiding all the component overhead.

I tried posting a message in the CakePHP Google Groups, but no response yet. And the IRC site is mysteriously down.

For now I can work around by either switching the helper to start the session or by instantiating an instance of CakeSession in my view. I don't really like either of these solutions and I may post a bug report if I don't get a response from the groups and the IRC doesn't come back.

2 Comments

MattC said on Feb 08, 2007
Since I never get a response to my posting on the CakePHP Google Group and the IRC still isn't back up, I've reopened the ticket that I believe broke this functionality in the first place.
john said on Apr 11, 2007
hi, got same problem here, and post question at google group. no answer neither.

I almost give up on using cake,but ur post saved my day, I didnt try it yet, but will try ur solution later.

btw, I am using later version of cake.