Ubiquity
2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ArrayApcCache.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ubiquity\cache\system
;
4
14
class
ArrayApcCache
extends
ArrayCache {
15
16
public
function
storeContent
($key, $content, $tag =
null
) {
17
parent::store ( $key, $content, $tag );
18
$apcK = $this->
getApcKey
( $key );
19
if
($this->
apcExists
( $apcK )) {
20
\apc_delete ( $apcK );
21
}
22
}
23
24
public
function
apcExists
($key) {
25
$success =
false
;
26
\apc_fetch ( $key, $success );
27
return
$success;
28
}
29
30
protected
function
apcDelete
($key) {
31
$apcK = $this->
getApcKey
( $key );
32
if
($this->
apcExists
( $apcK )) {
33
return \apc_delete ( $apcK );
34
}
35
return
false
;
36
}
37
38
protected
function
getApcKey
($key) {
39
return
md5 ( $this->_root . $key );
40
}
41
47
public
function
fetch
($key) {
48
$apcK = $this->
getApcKey
( $key );
49
if
($this->
apcExists
( $apcK )) {
50
return \apc_fetch ( $apcK );
51
}
52
$content = parent::fetch ( $key );
53
\apc_store ( $apcK, $content );
54
return
$content;
55
}
56
62
public
function
remove
($key) {
63
$this->
apcDelete
( $key );
64
return
parent::remove ( $key );
65
}
66
}
Ubiquity\cache\system\ArrayApcCache
This class is responsible for storing Arrays in PHP files, and require php apc.
Definition
ArrayApcCache.php:14
Ubiquity\cache\system\ArrayApcCache\apcDelete
apcDelete($key)
Definition
ArrayApcCache.php:30
Ubiquity\cache\system\ArrayApcCache\storeContent
storeContent($key, $content, $tag=null)
Definition
ArrayApcCache.php:16
Ubiquity\cache\system\ArrayApcCache\fetch
fetch($key)
{}
Definition
ArrayApcCache.php:47
Ubiquity\cache\system\ArrayApcCache\getApcKey
getApcKey($key)
Definition
ArrayApcCache.php:38
Ubiquity\cache\system\ArrayApcCache\apcExists
apcExists($key)
Definition
ArrayApcCache.php:24
Ubiquity\cache\system
Cache systems.
Definition
AbstractDataCache.php:6
C:
Users
myadd
Documents
GitHub
ubiquity-doc-api
vendor
phpmv
ubiquity
src
Ubiquity
cache
system
ArrayApcCache.php
Generated on Sun Dec 10 2023 15:04:12 for
Ubiquity
by
doxygen
1.9.8