Thank you very much Hector, 

I was also assisted from: 

http://www.zfsnippets.com/snippets/view/id/72/bootstrap-cache-resource 

There is a configuration line: 
/// use as default locale cache
 if (isset($options['isDefaultLocaleCache']) & 
 }

which activates the Zend_Locale cache as well. 

Regards, 

Armand 

On Fri, 18 Dec 2009 11:54:51 -0800, Hector Virgen  wrote:  

I'm not sure what's going on with Zend_Date, but as for the Cache
resource, here's a simple one I've put together: 

 /**  * Cache resource  *  * @author Hector Virgen  */ class
Default_Resource_Cache extends Zend_Application_Resource_ResourceAbstract {
 /**   * Creates a cache and returns it   *   * @return Zend_Cache_Core  
*/  public function init()  {  $options = $this->getOptions();    $cache =
Zend_Cache::factory(  $options['frontend'],  $options['backend'], 
$options['frontendOptions'],  $options['backendOptions']  );    return
$cache;  } } 

 To use it, just add a few lines to your application.ini: 
 
resources.cache.frontend = "Core" resources.cache.backend = "File"
resources.cache.frontendOptions.lifetime = 7200
resources.cache.frontendOptions.automatic_serialization = true
resources.cache.backendOptions.cache_dir = APPLICATION_PATH
"/../data/cache"  
--
Hector

 On Fri, Dec 18, 2009 at 11:44 AM,  wrote:
 Hello,

 Just wondering, why would a simple call on Zend_Date require Caching?

 I get:

 EXCEPTION INFORMATION:

 MESSAGE: Could not determine temp directory, please specify a cache_dir
 manually

 when I try to call new Zend_Date();

 The second question:
 Since Cache is not one in one of the "Available Resource Pluginse" what
is
 the best way to initiate it, to avoid similar messages with Zend_Date or
 Zend_Locale.

 Thank you for your time,
 Armand



Links:
------
[1] mailto:[email protected]

Reply via email to