Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Commit 0407587

Browse files
committed
redme
1 parent 62442e2 commit 0407587

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ mactronique_php_cache:
5050
name: "null"
5151
```
5252
53+
# Use
54+
55+
In controller :
56+
```
57+
// Set value into key for 30 seconds
58+
$this->get('mactronique_cache.phpcache')->set('key', 'value', 30);
59+
60+
// Set value into key
61+
$this->get('mactronique_cache.phpcache')->set('key', 'value');
62+
63+
//get key
64+
$this->get('mactronique_cache.phpcache')->get('key');
65+
66+
//check if key exists
67+
$this->get('mactronique_cache.phpcache')->exists('key');
68+
69+
//remove key
70+
$this->get('mactronique_cache.phpcache')->remove('key');
71+
```
5372
# Contributing
5473

5574
Please fork main repo and send a pull request with your change.

0 commit comments

Comments
 (0)