Zend Cache and Zend Console

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend Cache and Zend Console

Oscar Fanelli
Hi all, I received an exception when I tried to flush the filesystem cache from a Zend\Console action.

$cache  = new \Zend\Cache\Storage\Adapter\Filesystem();
$cache->setOptions(array('cacheDir' => \Gamempire\Entity\Image::IMAGES_DIR_CACHE));
$cache->flush();


======================================================================
   The application has thrown an exception!
======================================================================
 Zend\Cache\Exception\RuntimeException
 Flushing directory '/xxx/data/cache/images' failed


If i do it from a normal action and an http request, all is working fine.
Do you know if it's a bug?


---


Oscar Fanelli
Fondatore Gamempire.it
Email secondaria: [hidden email]
Skype: gamempire
Tel: 3388696167

Reply | Threaded
Open this post in threaded view
|

Re: Zend Cache and Zend Console

Jurian Sluiman
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Zend Cache and Zend Console

Oscar Fanelli
Thanks Jurian :)

Il giorno 10/set/2012, alle ore 17:11, Jurian Sluiman <[hidden email]> ha scritto:

Hi Oscar,

2012/9/10 Oscar Fanelli <[hidden email]>
Hi all, I received an exception when I tried to flush the filesystem cache from a Zend\Console action.

$cache  = new \Zend\Cache\Storage\Adapter\Filesystem();
$cache->setOptions(array('cacheDir' => \Gamempire\Entity\Image::IMAGES_DIR_CACHE));
$cache->flush();


======================================================================
   The application has thrown an exception!
======================================================================
 Zend\Cache\Exception\RuntimeException
 Flushing directory '/xxx/data/cache/images' failed


If i do it from a normal action and an http request, all is working fine.
Do you know if it's a bug?

If you have Apache running as www-data, all files written during your HTTP requests are owned by www-data. If you use your console as your own user (so, not www-data) and you haven't set permissions such you can remove files which are owned by www-data, you cannot remove those files.

Make sure those files can be removed by your own user and you can probably remove the files.
-- 
Jurian Sluiman