Issues (45)

src/Components/Cache/CacheInterface.php (6 issues)

1
<?php
2
3
namespace Matecat\SimpleS3\Components\Cache;
4
5
interface CacheInterface
6
{
7
    const HASH_ALGORITHM      = 'crc32b'; // 8 chars
8
    const HASH_SAFE_SEPARATOR = '::';
9
    const TTL_STANDARD        = 10800; // 3 hours
10
11
    /**
12
     * @return bool
13
     */
14
    public function flushAll();
15
16
    /**
17
     * @param string $bucket
18
     * @param string $keyname
19
     * @param null $version
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $version is correct as it would always require null to be passed?
Loading history...
20
     *
21
     * @return mixed
22
     */
23
    public function get($bucket, $keyname, $version = null);
24
25
    /**
26
     * @param string $bucket
27
     * @param string $keyname
28
     * @param null $version
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $version is correct as it would always require null to be passed?
Loading history...
29
     *
30
     * @return bool
31
     */
32
    public function has($bucket, $keyname, $version = null);
33
34
    /**
35
     * @param string $bucket
36
     * @param string $keyname
37
     * @param null $version
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $version is correct as it would always require null to be passed?
Loading history...
38
     */
39
    public function remove($bucket, $keyname, $version = null);
40
41
    /**
42
     * @param string $bucket
43
     * @param string $keyname
44
     *
45
     * @return array
46
     */
47
    public function search($bucket, $keyname);
48
49
    /**
50
     * @param string $bucket
51
     * @param string $keyname
52
     * @param mixed  $content
53
     * @param null   $version
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $version is correct as it would always require null to be passed?
Loading history...
54
     * @param null   $ttl
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $ttl is correct as it would always require null to be passed?
Loading history...
55
     */
56
    public function set($bucket, $keyname, $content, $version = null, $ttl = null);
57
58
    /**
59
     * @param string $separator
60
     */
61
    public function setPrefixSeparator($separator);
62
63
    /**
64
     * @param string $bucket
65
     * @param string $keyname
66
     * @param null $version
0 ignored issues
show
Documentation Bug introduced by
Are you sure the doc-type for parameter $version is correct as it would always require null to be passed?
Loading history...
67
     *
68
     * @return int
69
     */
70
    public function ttl($bucket, $keyname, $version = null);
71
}
72