Skip to content

Commit

Permalink
update FileCache.md
Browse files Browse the repository at this point in the history
  • Loading branch information
easy-system committed Jun 9, 2016
1 parent 761c4f9 commit eef7880
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/FileCache.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ To check the state of the adapter, use the method of `isEnabled()`.
$foo = new \stdClass();
$cache->set('foo', $foo);
```
In the example used above the lifetime of variables defined for the default
lifetime adapter. To set the lifetime for a specific variable:
```
$foo = new \stdClass();
$cache->set('foo', $foo, 360);
```
The lifetime of a variable is set in seconds.

## Retrive variable
```
$foo = $cache->get('foo);
$foo = $cache->get('foo');
```

## Remove variable
Expand Down

0 comments on commit eef7880

Please sign in to comment.