google/appengine/ext/session/MemcacheSessionHandler.php
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\google\appengine\ext\session\MemcacheContainer
Methods
close
()
: bool
Closes the Memcache instance.
Type | Description |
---|---|
bool | true if successful, false otherwise |
delete
(string $key)
: bool
Removes the key value pair, keyed with the input variable.
Name | Type | Description |
---|---|---|
$key | string |
Input key to remove key value pair |
Type | Description |
---|---|
bool | true if successful, false otherwise |
get
(string $key)
: string
Finds the value associated with input key, from Memcache.
Name | Type | Description |
---|---|---|
$key | string |
Input key from which to find value |
Type | Description |
---|---|
string | value associated with input key |
set
(string $key, string $value, int $expire)
: bool
Inserts a key value pair, with expiry time, into Memcache.
Name | Type | Description |
---|---|---|
$key | string |
Input key to associate with the value |
$value | string |
Input value to be stored |
$expire | int |
Time until the pair can be garbage collected |
Type | Description |
---|---|
bool | true if successful, false otherwise |
\google\appengine\ext\session\MemcacheSessionHandler
- Implements
Constants
Methods
__construct
(
\google\appengine\ext\session\MemcacheContainer
$memcacheContainer = null)
: void
Constructs the session handler instance.
Name | Type | Description |
---|---|---|
$memcacheContainer | \google\appengine\ext\session\MemcacheContainer |
Optional, for mocking in tests |
close
()
: bool
Closes the session handler.
Type | Description |
---|---|
bool | true if successful, false otherwise |
configure
(
\google\appengine\ext\session\MemcacheContainer
$memcacheContainer = null)
: void
Configure the session handler to use the Memcache API.
Name | Type | Description |
---|---|---|
$memcacheContainer | \google\appengine\ext\session\MemcacheContainer |
Optional, for mocking in tests |
destroy
(string $id)
: bool
Destroy the data associated with a particular session ID.
Name | Type | Description |
---|---|---|
$id | string |
Session ID associated with the data to be destroyed |
Type | Description |
---|---|
bool | true if successful, false otherwise |
gc
(int $maxlifetime)
: bool
Garbage collection method - always returns true as this is handled by the Memcache expire function.
Name | Type | Description |
---|---|---|
$maxlifetime | int |
Not used |
Type | Description |
---|---|
bool | true if successful, false otherwise |
open
(string $savePath, string $sessionName)
: bool
Opens the session handler.
Name | Type | Description |
---|---|---|
$savePath | string |
Not used |
$sessionName | string |
Not ued |
Type | Description |
---|---|
bool | true if successful, false otherwise |
read
(string $id)
: string
Read an element from Memcache with the given ID.
Name | Type | Description |
---|---|---|
$id | string |
Session ID associated with the data to be retrieved |
Type | Description |
---|---|
string | data associated with that ID or bool false on failure |