|
Lines 242-253
The possible options are:
Link Here
|
| 242 |
|
242 |
|
| 243 |
Expiry time of this cached entry in seconds. |
243 |
Expiry time of this cached entry in seconds. |
| 244 |
|
244 |
|
| 245 |
=item deepcopy |
245 |
=item unsafe |
| 246 |
|
246 |
|
| 247 |
If set, this will perform a deep copy of the item when it's retrieved. This |
247 |
If set, this will avoid performing a deep copy of the item. This |
| 248 |
means that it'll be safe if something later modifies the result of the |
248 |
means that it won't be safe if something later modifies the result of the |
| 249 |
function. Will be ignored in situations where the same behaviour comes from |
249 |
function. It should be used with caution, and could save processing time |
| 250 |
the caching layer anyway. |
250 |
in some situations where is safe to use it. |
| 251 |
|
251 |
|
| 252 |
=item cache |
252 |
=item cache |
| 253 |
|
253 |
|
|
Lines 307-316
sub set_in_cache {
Link Here
|
| 307 |
|
307 |
|
| 308 |
Retrieve the value stored under the specified key in the default cache. |
308 |
Retrieve the value stored under the specified key in the default cache. |
| 309 |
|
309 |
|
| 310 |
The options can set an unsafe flag to avoid a deep copy. |
310 |
The possible options are: |
| 311 |
When this flag is set, you have to know what you are doing! |
311 |
|
| 312 |
If you are retrieving a structure and modify it, you will modify the contain |
312 |
=over |
| 313 |
of the cache! |
313 |
|
|
|
314 |
=item unsafe |
| 315 |
|
| 316 |
If set, this will avoid performing a deep copy of the item. This |
| 317 |
means that it won't be safe if something later modifies the result of the |
| 318 |
function. It should be used with caution, and could save processing time |
| 319 |
in some situations where is safe to use it. Make sure you know what you are doing! |
| 320 |
|
| 321 |
=item cache |
| 322 |
|
| 323 |
The cache object to use if you want to provide your own. It should be an |
| 324 |
instance of C<Cache::*> and follow the same interface as L<Cache::Memcache>. |
| 325 |
|
| 326 |
=back |
| 314 |
|
327 |
|
| 315 |
=cut |
328 |
=cut |
| 316 |
|
329 |
|
| 317 |
- |
|
|