forked from TruCopilot/phpfastcache
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path101.learn_fast.php
More file actions
30 lines (23 loc) · 837 Bytes
/
Copy path101.learn_fast.php
File metadata and controls
30 lines (23 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
/*
* Here is how to setup and work on phpFastCache fast!
*/
require_once("phpfastcache.php");
// auto, files, sqlite, xcache, memcache, apc, memcached, wincache
phpFastCache::setup("storage","auto");
// SET a Data into Cache
__c()->set("keyword", "array|object|string|data", $time_in_second);
// GET a Data from Cache
$data = __c()->get("keyword");
$object = __c()->getInfo("keyword"); // ARRAY
// Others Funtions
__c()->delete("keyword");
__c()->increment("keyword", $step = 1); // TRUE | FALSE
__c()->decrement("keyword", $step = 1); // TRUE | FALSE
__c()->touch("keyword", $more_time_in_second); // TRUE | FALSE
__c()->clean();
__c()->stats(); // ARRAY
__c()->isExisting("keyword"); // TRUE | FALSE
// Direct Keyword SET & GET
__c()->keyword = array("array|object|string|data", $time_in_second);
$data = __c()->keyword;