Skip to content

Commit 66908f9

Browse files
author
Andrey Helldar
authored
Added Cache::remember method
1 parent 0a0f5a0 commit 66908f9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Cache/Store.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,19 @@ public function get(string $key, $default = null);
4242
*/
4343
public function put(string $key, $value, int $seconds);
4444

45+
/**
46+
* Store an item in the cache for a given number of seconds.
47+
*
48+
* The `put` method alias to improve usability.
49+
*
50+
* @param string $key
51+
* @param mixed $callback
52+
* @param int $seconds
53+
*
54+
* @return mixed
55+
*/
56+
public function remember(string $key, $value, int $seconds);
57+
4558
/**
4659
* Remove an item from the cache.
4760
*

0 commit comments

Comments
 (0)