@@ -40,6 +40,9 @@ public function __construct(\Redis $cache)
40
40
$ this ->cache = $ cache ;
41
41
}
42
42
43
+ /**
44
+ * {@inheritdoc}
45
+ */
43
46
protected function fetchObjectFromCache ($ key )
44
47
{
45
48
if (false === $ result = unserialize ($ this ->cache ->get ($ this ->getHierarchyKey ($ key )))) {
@@ -49,11 +52,17 @@ protected function fetchObjectFromCache($key)
49
52
return $ result ;
50
53
}
51
54
55
+ /**
56
+ * {@inheritdoc}
57
+ */
52
58
protected function clearAllObjectsFromCache ()
53
59
{
54
60
return $ this ->cache ->flushDb ();
55
61
}
56
62
63
+ /**
64
+ * {@inheritdoc}
65
+ */
57
66
protected function clearOneObjectFromCache ($ key )
58
67
{
59
68
$ this ->commit ();
@@ -65,6 +74,9 @@ protected function clearOneObjectFromCache($key)
65
74
return $ this ->cache ->del ($ keyString ) >= 0 ;
66
75
}
67
76
77
+ /**
78
+ * {@inheritdoc}
79
+ */
68
80
protected function storeItemInCache (CacheItemInterface $ item , $ ttl )
69
81
{
70
82
$ key = $ this ->getHierarchyKey ($ item ->getKey ());
@@ -76,6 +88,9 @@ protected function storeItemInCache(CacheItemInterface $item, $ttl)
76
88
return $ this ->cache ->setex ($ key , $ ttl , $ data );
77
89
}
78
90
91
+ /**
92
+ * {@inheritdoc}
93
+ */
79
94
public function save (CacheItemInterface $ item )
80
95
{
81
96
if ($ item instanceof TaggableItemInterface) {
@@ -85,26 +100,41 @@ public function save(CacheItemInterface $item)
85
100
return parent ::save ($ item );
86
101
}
87
102
103
+ /**
104
+ * {@inheritdoc}
105
+ */
88
106
protected function getValueFormStore ($ key )
89
107
{
90
108
return $ this ->cache ->get ($ key );
91
109
}
92
110
111
+ /**
112
+ * {@inheritdoc}
113
+ */
93
114
protected function appendListItem ($ name , $ value )
94
115
{
95
116
$ this ->cache ->lPush ($ name , $ value );
96
117
}
97
118
119
+ /**
120
+ * {@inheritdoc}
121
+ */
98
122
protected function getList ($ name )
99
123
{
100
124
return $ this ->cache ->lRange ($ name , 0 , -1 );
101
125
}
102
126
127
+ /**
128
+ * {@inheritdoc}
129
+ */
103
130
protected function removeList ($ name )
104
131
{
105
132
return $ this ->cache ->del ($ name );
106
133
}
107
134
135
+ /**
136
+ * {@inheritdoc}
137
+ */
108
138
protected function removeListItem ($ name , $ key )
109
139
{
110
140
return $ this ->cache ->lrem ($ name , $ key , 0 );
0 commit comments