Ticket #665 (new enhancement)

Opened 11 months ago

Last modified 3 months ago

ezCacheManagerModel - Caching code sample

Reported by: ross Owned by: david
Priority: normal Milestone: AgaviForge
Component: _OTHER_ Version:
Severity: normal Keywords:
Cc: Patch attached: yes

Description (last modified by ross) (diff)

Allows you to have a cache that isn't session related.
(ezcCache allows for file or memory caching so its flexible.)

ezCacheManagerModel.class.php - is an adapter interface to ezcCacheManager whilst still allowing for Agaviesq configuration. ezCache.xml - is the default cache configurations

Usage example

 $ezCache = $this->context->getModel(‘ezCacheManager’)->fetchCache(‘myCache’);

// Store some info
  $ezCache->store('test', 'this is some test data');

// restore from cache
  $test = $ezCache->restore('test');

Requirements

  • AgaviConfig::get('ezcomponents.lib_dir') - I set this in config.php sets the location of the ezcomponents dir - you could change it in the ezCacheManagerModel
  • app/cache/ezCache.xml - you could change it in the ezCacheManagerModel
  • ezcomponents Base and Cache!

Attachments

ezCacheManagerModel.class.php (3.8 KB) - added by ross 11 months ago.
ezCache.xml (400 bytes) - added by ross 11 months ago.

Change History

Changed 11 months ago by ross

Changed 11 months ago by ross

  • type changed from defect to enhancement

Changed 11 months ago by ross

Changed 11 months ago by ross

  • description modified (diff)

Changed 11 months ago by david

  • version HEAD deleted

This is pretty much what #661 would be like

Changed 3 months ago by david

  • milestone changed from 1.1 to 1.2

Changed 3 months ago by david

  • milestone changed from 1.2 to AgaviForge

Add/Change #665 (ezCacheManagerModel - Caching code sample)

Author



Action
as new
 
Note: See TracTickets for help on using tickets.