Skip to content

Commit a8d2c3e

Browse files
committed
Merge pull request #1 from PHPSocialNetwork/gh-pages
new home page
2 parents 829e4fe + edfbb73 commit a8d2c3e

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

index.html

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -691,40 +691,28 @@ <h2>PHP Caching Class For Database</h2>
691691
<pre class="prettyprint php">
692692
&lt;?php
693693
// In your config file
694-
// include("phpFastCache/phpFastCache.php"); or use "Composer" Vendor / Autoload
695-
// phpFastCache support "ssdb", "mongodb", "redis", "cookie", "apc", "memcache",
696-
// "memcached", "wincache" ,"files", "sqlite" and "xcache"
694+
// include("phpFastCache/phpFastCache.php"); or use "Composer" / Autoload
697695

698696
use phpFastCache\CacheManager;
699697

700698
$config = array(
701-
"storage" => "files",
699+
"storage" => "files", // memcached, redis, ssdb, ..etc
702700
"path" => "/your_cache_path/dir/",
703701
);
704-
705702
CacheManager::setup($config); // look at folder "Examples" for more setup & config
706-
CacheManager::CachingMethod("phpfastcache"); // use "normal" as traditional
707-
708-
// You don't need to change your code when you change your caching system,
709-
$cache = CacheManager::getInstance();
710-
// $cache = CacheManager::Files();
711-
// $cache = CacheManager::Memcached(); <-- ::Reids() ::Predis() ::ssdb() ..etc
712-
// $cache = CacheManager::getInstance("redis", $config);
713703

714704
// In your Class, Functions, PHP Pages
715-
// try to get from Cache first. product_page = YOUR Identity Keyword
716-
$products = $cache->get("product_page");
717-
// Lazy? $products = CacheManager::get("keyword");
705+
// First try to get from Cache first. product_page = YOUR Identity Keyword
706+
$products = CacheManager::get("keyword");
718707

719708
if(is_null($products)) {
720709
$products = YOUR DB QUERIES || GET_PRODUCTS_FUNCTION;
721710
// set products in to cache in 600 seconds = 10 minutes and 0 = never expired
722-
$cache->set("product_page", $products,600);
723-
// CacheManager::set() work the same too
711+
CacheManager::set("product_page", $products,600);
712+
// In next 600 seconds, phpFastCache will take care your heavy traffic
724713
}
725714

726-
// Output Your Contents $products HERE
727-
// LOOP | echo $products
715+
// LOOP | Output Your $products
728716
</pre>
729717
</p>
730718
<br><br>
@@ -741,6 +729,11 @@ <h2>Powerful PHP Caching Class</h2><p class="inline">: You are using Bing API, G
741729
use phpFastCache\CacheManager;
742730

743731
$cache = CacheManager::Memcached();
732+
// Yo? Look at examples Folder.
733+
// $cache = CacheManager::getInstance();
734+
// $cache = CacheManager::getInstance("redis", $setup);
735+
// $cache = CacheManager::Files($setup);
736+
// $cache = CacheManager::Redis();
744737

745738
// try to get from Cache first.
746739
$results = $cache->get("identity_keyword")

0 commit comments

Comments
 (0)