CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.1 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.1
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
    • Network
      • Email
      • Http
    • Routing
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • CacheSession
  • DatabaseSession

Interfaces

  • CakeSessionHandlerInterface

Class CacheSession

CacheSession provides method for saving sessions into a Cache engine. Used with CakeSession

CacheSession implements CakeSessionHandlerInterface
Package: Cake\Model\Datasource\Session
See: CakeSession for configuration information.
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/Model/Datasource/Session/CacheSession.php

Method Summary

  • __destruct() public
    Closes the session before the objects handling it become unavailable
  • close() public
    Method called on close of a database session.
  • destroy() public
    Method called on the destruction of a database session.
  • gc() public
    Helper function called on gc for database sessions.
  • open() public
    Method called on open of a database session.
  • read() public
    Method used to read from a database session.
  • write() public
    Helper function called on write for database sessions.

Method Detail

__destruct() public ¶

__destruct( )

Closes the session before the objects handling it become unavailable

close() public ¶

close( )

Method called on close of a database session.

Returns
boolean
Success
Implementation of
CakeSessionHandlerInterface::close()

destroy() public ¶

destroy( integer $id )

Method called on the destruction of a database session.

Parameters
integer $id
ID that uniquely identifies session in database
Returns
boolean
True for successful delete, false otherwise.
Implementation of
CakeSessionHandlerInterface::destroy()

gc() public ¶

gc( integer $expires = null )

Helper function called on gc for database sessions.

Parameters
integer $expires optional null
Timestamp (defaults to current time)
Returns
boolean
Success
Implementation of
CakeSessionHandlerInterface::gc()

open() public ¶

open( )

Method called on open of a database session.

Returns
boolean
Success
Implementation of
CakeSessionHandlerInterface::open()

read() public ¶

read( mixed $id )

Method used to read from a database session.

Parameters
mixed $id
The key of the value to read
Returns
mixed
The value of the key or false if it does not exist
Implementation of
CakeSessionHandlerInterface::read()

write() public ¶

write( integer $id , mixed $data )

Helper function called on write for database sessions.

Parameters
integer $id
ID that uniquely identifies session in database
mixed $data
The value of the data to be saved.
Returns
boolean
True for successful write, false otherwise.
Implementation of
CakeSessionHandlerInterface::write()
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs