@@ -43,6 +43,9 @@ public function __construct(Filesystem $filesystem)
43
43
$ this ->filesystem ->createDir (self ::CACHE_PATH );
44
44
}
45
45
46
+ /**
47
+ * {@inheritdoc}
48
+ */
46
49
protected function fetchObjectFromCache ($ key )
47
50
{
48
51
$ file = $ this ->getFilePath ($ key );
@@ -63,6 +66,9 @@ protected function fetchObjectFromCache($key)
63
66
return [true , $ data [1 ], $ data [2 ]];
64
67
}
65
68
69
+ /**
70
+ * {@inheritdoc}
71
+ */
66
72
protected function clearAllObjectsFromCache ()
67
73
{
68
74
$ this ->filesystem ->deleteDir (self ::CACHE_PATH );
@@ -71,13 +77,19 @@ protected function clearAllObjectsFromCache()
71
77
return true ;
72
78
}
73
79
80
+ /**
81
+ * {@inheritdoc}
82
+ */
74
83
protected function clearOneObjectFromCache ($ key )
75
84
{
76
85
$ this ->preRemoveItem ($ key );
77
86
78
87
return $ this ->forceClear ($ key );
79
88
}
80
89
90
+ /**
91
+ * {@inheritdoc}
92
+ */
81
93
protected function storeItemInCache (CacheItemInterface $ item , $ ttl )
82
94
{
83
95
$ file = $ this ->getFilePath ($ item ->getKey ());
@@ -113,6 +125,9 @@ private function getFilePath($key)
113
125
return sprintf ('%s/%s ' , self ::CACHE_PATH , $ key );
114
126
}
115
127
128
+ /**
129
+ * {@inheritdoc}
130
+ */
116
131
public function save (CacheItemInterface $ item )
117
132
{
118
133
if ($ item instanceof TaggableItemInterface) {
@@ -122,6 +137,9 @@ public function save(CacheItemInterface $item)
122
137
return parent ::save ($ item );
123
138
}
124
139
140
+ /**
141
+ * {@inheritdoc}
142
+ */
125
143
protected function getList ($ name )
126
144
{
127
145
$ file = $ this ->getFilePath ($ name );
@@ -133,12 +151,18 @@ protected function getList($name)
133
151
return unserialize ($ this ->filesystem ->read ($ file ));
134
152
}
135
153
154
+ /**
155
+ * {@inheritdoc}
156
+ */
136
157
protected function removeList ($ name )
137
158
{
138
159
$ file = $ this ->getFilePath ($ name );
139
160
$ this ->filesystem ->delete ($ file );
140
161
}
141
162
163
+ /**
164
+ * {@inheritdoc}
165
+ */
142
166
protected function appendListItem ($ name , $ key )
143
167
{
144
168
$ list = $ this ->getList ($ name );
@@ -147,6 +171,9 @@ protected function appendListItem($name, $key)
147
171
return $ this ->filesystem ->update ($ this ->getFilePath ($ name ), serialize ($ list ));
148
172
}
149
173
174
+ /**
175
+ * {@inheritdoc}
176
+ */
150
177
protected function removeListItem ($ name , $ key )
151
178
{
152
179
$ list = $ this ->getList ($ name );
0 commit comments