# sfGoogleGearCache Plugin ## Overview sfGoogleGearCachePlugin use [Google Gear](http://gears.google.com) to cache resources on the browser computer. Browsers already got cache but user has no actual control on which site caches what. So a uninteresting site may remove data of a very interesting one. To use [Google Gear](http://gears.google.com) allow users to explicitly allow a given site to store more informations on their computers. So users get faster response and sites reduce their bandwidth cost, seems like a win-win deal to me :) ## Installation To install sfGoogleGearCachePlugin: ./symfony plugin-install symfony/sfGoogleGearCachePlugin To install from svn: svn co http://svn.symfony-project.com/plugins/sfGoogleGearCachePlugin plugins/sfGoogleGearCachePlugin Clear your cache ./symfony cc ## Usage Add the following at the end of the layout.php, it will include all the javascript needed to cache the registered rescources. <script> <?= sfGoogleGearCache::getJavascript() ?> </script> To register a given url as cachable, do sfGoogleGearCache::addUrl('myurl/to/cache'); You may simplify the mechanism even further by automatically caching all the stylesheet and javascript of the sfResponse <script> <?= sfGoogleGearCache::addResponseCssJS() ?> <?= sfGoogleGearCache::getJavascript() ?> </script> ## TODO * this is a early version ## License For the full copyright and license information, please view the LICENSE file that was distributed with this source code.