ZF-11100: Zend_Cache_Frontend_File should check to see if file exists first

Issue Type: Bug Created: 2011-02-21T12:02:53.000+0000 Last Updated: 2011-03-06T03:53:22.000+0000 Status: Closed Fix version(s): - 1.11.5 (07/Apr/11)

Reporter: Dan Berman (panckreous) Assignee: Marc Bennewitz (private) (mabe) Tags: - Zend_Cache

Related issues: Attachments:


$mtime = @filemtime($masterFile); should detect if the file exists first.

Use case:

Deployment tools such as Capistrano create a new directory upon each deploy and then symlink to the latest deploy

for example current -> /var/www/website/releases/20110220101853/

Let's say we launch a new ec2 instance, which initiates a new deploy

current then points to a new dir, for example current -> /var/www/website/releases/20110220101860/

When the new instance is hit, the cache looks to a file that does not exist, and causes an error until we clear out the cache.

What it should do is, instead of just grabbing executing filemtime, is see if the file exists first. If the file does not exist, it should return false so the cache object repopulates it


Posted by Marc Bennewitz (private) (mabe) on 2011-03-02T14:37:06.000+0000

fixed in r23792 (trunk) & r23793 (1.11 branch)

I'll close this issue next time because 1.11.4 was already tagged.

Posted by Marc Bennewitz (private) (mabe) on 2011-03-06T03:53:22.000+0000


Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.