@@ -69,7 +69,7 @@ Saving Cache Items
69
69
------------------
70
70
71
71
The most common method to save cache items is
72
- :method: ` Psr\\ Cache\\ CacheItemPoolInterface::save `, which stores the
72
+ `` Psr\\Cache\\CacheItemPoolInterface::save ` `, which stores the
73
73
item in the cache immediately (it returns ``true `` if the item was saved or
74
74
``false `` if some error occurred)::
75
75
@@ -80,9 +80,9 @@ item in the cache immediately (it returns ``true`` if the item was saved or
80
80
81
81
Sometimes you may prefer to not save the objects immediately in order to
82
82
increase the application performance. In those cases, use the
83
- :method: ` Psr\\ Cache\\ CacheItemPoolInterface::saveDeferred ` method to mark cache
83
+ `` Psr\\Cache\\CacheItemPoolInterface::saveDeferred ` ` method to mark cache
84
84
items as "ready to be persisted" and then call to
85
- :method: ` Psr\\ Cache\\ CacheItemPoolInterface::commit ` method when you are ready
85
+ `` Psr\\Cache\\CacheItemPoolInterface::commit ` ` method when you are ready
86
86
to persist them all::
87
87
88
88
// ...
@@ -103,22 +103,22 @@ Removing Cache Items
103
103
--------------------
104
104
105
105
Cache Pools include methods to delete a cache item, some of them or all of them.
106
- The most common is :method: ` Psr\\ Cache\\ CacheItemPoolInterface::deleteItem `,
106
+ The most common is `` Psr\\Cache\\CacheItemPoolInterface::deleteItem ` `,
107
107
which deletes the cache item identified by the given key (it returns ``true ``
108
108
when the item is successfully deleted or doesn't exist and ``false `` otherwise)::
109
109
110
110
// ...
111
111
$isDeleted = $cache->deleteItem('user_'.$userId);
112
112
113
- Use the :method: ` Psr\\ Cache\\ CacheItemPoolInterface::deleteItems ` method to
113
+ Use the `` Psr\\Cache\\CacheItemPoolInterface::deleteItems ` ` method to
114
114
delete several cache items simultaneously (it returns ``true `` only if all the
115
115
items have been deleted, even when any or some of them don't exist)::
116
116
117
117
// ...
118
118
$areDeleted = $cache->deleteItems(array('category1', 'category2'));
119
119
120
120
Finally, to remove all the cache items stored in the pool, use the
121
- :method: ` Psr\\ Cache\\ CacheItemPoolInterface::clear ` method (which returns ``true ``
121
+ `` Psr\\Cache\\CacheItemPoolInterface::clear ` ` method (which returns ``true ``
122
122
when all items are successfully deleted)::
123
123
124
124
// ...
@@ -157,7 +157,7 @@ Pruning Cache Items
157
157
Some cache pools do not include an automated mechanism for pruning expired cache items.
158
158
For example, the :ref: `FilesystemAdaper <component-cache-filesystem-adapter >` cache
159
159
does not remove expired cache items *until an item is explicitly requested and determined to
160
- be expired *, for example, via a call to :method: ` Psr\\ Cache\\ CacheItemPoolInterface::getItem `.
160
+ be expired *, for example, via a call to `` Psr\\Cache\\CacheItemPoolInterface::getItem ` `.
161
161
Under certain workloads, this can cause stale cache entries to persist well past their
162
162
expiration, resulting in a sizable consumption of wasted disk or memory space from excess,
163
163
expired cache items.
0 commit comments