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:
<?php
/**
* 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, <[email protected]> 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
>
>