ILIAS
trunk Revision v11.0_alpha-1731-gff9cd7e2bd3
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
BaseAdaptor.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\Cache\Adaptor
;
22
23
use
ILIAS\Cache\Config
;
24
28
abstract
class
BaseAdaptor
implements
Adaptor
29
{
30
protected
const
LOCK_UNTIL
=
'_lock_until'
;
31
private
string
$instance_prefix
;
32
33
public
function
__construct
(
protected
Config
$config)
34
{
35
// generates a unique prefix for the current instance. this is only to prevent collisions when running multiple
36
// ILIAS Instances on the same server. It uses the md5 hash of the current working directory and takes the first
37
// 6 characters. This is not a secure way to generate a prefix, but it is sufficient for this purpose.
38
// It's highly unlikely that two paths will result in the same prefix.
39
$this->instance_prefix = substr(md5(getcwd()), 0, 6);
40
}
41
42
protected
function
buildKey
(
string
$container
,
string
$key): string
43
{
44
return
$this->
buildContainerPrefix
($container) . $key;
45
}
46
47
protected
function
buildContainerPrefix
(
string
$container
): string
48
{
49
return
$this->instance_prefix . self::CONTAINER_PREFIX_SEPARATOR . $container . self::CONTAINER_PREFIX_SEPARATOR;
50
}
51
}
ILIAS\Cache\Adaptor\BaseAdaptor\buildKey
buildKey(string $container, string $key)
Definition:
BaseAdaptor.php:42
ILIAS\Cache\Adaptor\BaseAdaptor\buildContainerPrefix
buildContainerPrefix(string $container)
Definition:
BaseAdaptor.php:47
ILIAS\Cache\Adaptor\Adaptor\Adaptor
Definition:
Adaptor.php:28
ILIAS\Cache\Adaptor
Definition:
Adaptor.php:21
ILIAS\Cache\Adaptor\BaseAdaptor\__construct
__construct(protected Config $config)
Definition:
BaseAdaptor.php:33
$container
$container
Definition:
wac.php:36
ILIAS\Cache\Config
Definition:
Config.php:29
ILIAS\Cache\Adaptor\BaseAdaptor
Definition:
BaseAdaptor.php:28
ILIAS\Cache\Adaptor\BaseAdaptor\LOCK_UNTIL
const LOCK_UNTIL
Definition:
BaseAdaptor.php:30
Config
ILIAS\Cache\Adaptor\BaseAdaptor\$instance_prefix
string $instance_prefix
Definition:
BaseAdaptor.php:31
components
ILIAS
Cache
src
Adaptor
BaseAdaptor.php
Generated on Mon Apr 7 2025 23:02:58 for ILIAS by
1.8.13 (using
Doxyfile
)