Hi Greg, Ryan,
On Apr 17, 2011, at 01:03, Greg Skerman wrote:
> User visits an online store, and puts a bunch of items in their shopping cart.
> User then decides to leave the store, without going through the checkout
> Weeks later, the user revisits the store
Take a look at the builtin Session component, from your controller,
$this->Session->read('cart'); and $this->Session->write('cart',
$cart); is what you're looking for. Like ryan mentioned php and thus
cake already does this by default.
On Sun, Apr 17, 2011 at 8:43 AM, Ryan Schmidt
<[email protected]> wrote:
> you'll quickly end up with tons of sessions lying around taking up disk space
> that aren't actually being used by anyone.
Increase the session time as you see fit (to a responsible extent),
session storage eats up minor storage. Depending on server setup, they
usually become stale and stay around anyway, even if they are struck
in /tmp, servers arent meant to reboot ;-) Not something you want to
rely on as a developer. That means that the shorter the lifespan of a
session, the quicker new sessions are created and thus you'll have
more garbage then when you increase the expiry date and keep them
around longer, as they are reused more often. Also, most modern
session implementations automaticly generate the session as a security
measure, also resulting in stale sessions left around. You really
should implement session cleanup at regular intervals.
I usually store my sessions in memcache, its faster, its distributed,
and cleans up after itself.
Regards, Yuka
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php