summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/sessions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/libraries/sessions.rst')
-rw-r--r--user_guide_src/source/libraries/sessions.rst21
1 files changed, 15 insertions, 6 deletions
diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst
index c8a1f1925..2034ed2b0 100644
--- a/user_guide_src/source/libraries/sessions.rst
+++ b/user_guide_src/source/libraries/sessions.rst
@@ -363,7 +363,7 @@ To read a tempdata variable, again you can just access it through the
.. important:: The ``userdata()`` method will NOT return tempdata items.
-Or if you want to be sure that you're reading "flashdata" (and not any
+Or if you want to be sure that you're reading "tempdata" (and not any
other kind), you can also use the ``tempdata()`` method::
$this->session->tempdata('item');
@@ -569,9 +569,10 @@ However, there are some conditions that must be met:
- Only your **default** database connection (or the one that you access
as ``$this->db`` from your controllers) can be used.
- - You can NOT use a persistent connection.
- You must have the :doc:`Query Builder </database/query_builder>`
enabled.
+ - You can NOT use a persistent connection.
+ - You can NOT use a connection with the *cache_on* setting enabled.
In order to use the 'database' session driver, you must also create this
table that we already mentioned and then set it as your
@@ -596,7 +597,7 @@ For MySQL::
`id` varchar(40) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
- `data` blob DEFAULT '' NOT NULL,
+ `data` blob NOT NULL,
PRIMARY KEY (id),
KEY `ci_sessions_timestamp` (`timestamp`)
);
@@ -630,12 +631,16 @@ also do the following, after creating the table::
Redis Driver
------------
+.. note:: Since Redis doesn't have a locking mechanism exposed, locks for
+ this driver are emulated by a separate value that is kept for up
+ to 300 seconds.
+
Redis is a storage engine typically used for caching and popular because
of its high performance, which is also probably your reason to use the
'redis' session driver.
The downside is that it is not as ubiquitous as relational databases and
-requires the `phpredis <https://github.com/nicolasff/phpredis>`_ PHP
+requires the `phpredis <https://github.com/phpredis/phpredis>`_ PHP
extension to be installed on your system, and that one doesn't come
bundled with PHP.
Chances are, you're only be using the 'redis' driver only if you're already
@@ -663,6 +668,10 @@ sufficient::
Memcached Driver
----------------
+.. note:: Since Memcache doesn't have a locking mechanism exposed, locks
+ for this driver are emulated by a separate value that is kept for
+ up to 300 seconds.
+
The 'memcached' driver is very similar to the 'redis' one in all of its
properties, except perhaps for availability, because PHP's `Memcached
<http://php.net/memcached>`_ extension is distributed via PECL and some
@@ -828,7 +837,7 @@ Class Reference
.. note:: This method is DEPRECATED. Use ``userdata()``
with no parameters instead.
- .. php:method:: &get_usedata()
+ .. php:method:: &get_userdata()
:returns: A reference to ``$_SESSION``
:rtype: array
@@ -1045,4 +1054,4 @@ Class Reference
$this->session->foo = 'bar';
// Results in:
- // $_SESSION['foo'] = 'bar'; \ No newline at end of file
+ // $_SESSION['foo'] = 'bar';