Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
3b63335c
Commit
3b63335c
authored
Jun 22, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added apc session driver.
parent
24c2344a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
1 deletion
+53
-1
session.php
application/config/session.php
+1
-1
apc.php
system/session/driver/apc.php
+49
-0
factory.php
system/session/factory.php
+3
-0
No files found.
application/config/session.php
View file @
3b63335c
...
...
@@ -12,7 +12,7 @@ return array(
| Since HTTP is stateless, sessions are used to maintain "state" across
| multiple requests from the same user of your application.
|
| Supported Drivers: 'file', 'db', 'memcached'.
| Supported Drivers: 'file', 'db', 'memcached'
, 'apc'
.
|
*/
...
...
system/session/driver/apc.php
0 → 100644
View file @
3b63335c
<?php
namespace
System\Session\Driver
;
class
APC
implements
\System\Session\Driver
{
/**
* Load a session by ID.
*
* @param string $id
* @return array
*/
public
function
load
(
$id
)
{
return
\System\Cache
::
driver
(
'apc'
)
->
get
(
$id
);
}
/**
* Save a session.
*
* @param array $session
* @return void
*/
public
function
save
(
$session
)
{
\System\Cache
::
driver
(
'apc'
)
->
put
(
$session
[
'id'
],
$session
,
\System\Config
::
get
(
'session.lifetime'
));
}
/**
* Delete a session by ID.
*
* @param string $id
* @return void
*/
public
function
delete
(
$id
)
{
\System\Cache
::
driver
(
'apc'
)
->
forget
(
$id
);
}
/**
* Delete all expired sessions.
*
* @param int $expiration
* @return void
*/
public
function
sweep
(
$expiration
)
{
// APC sessions will expire automatically.
}
}
\ No newline at end of file
system/session/factory.php
View file @
3b63335c
...
...
@@ -21,6 +21,9 @@ class Factory {
case
'memcached'
:
return
new
Driver\Memcached
;
case
'apc'
:
return
new
Driver\APC
;
default
:
throw
new
\Exception
(
"Session driver [
$driver
] is not supported."
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment