Development

#1964 (sfProcessCache eaccelerator delete also cached scripts not only cached data (contains solution))

You must first sign up to be able to contribute.

Ticket #1964 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

sfProcessCache eaccelerator delete also cached scripts not only cached data (contains solution)

Reported by: adrive Assigned to: fabien
Priority: minor Milestone: 1.0.10
Component: cache Version: 1.0.0
Keywords: Cc:
Qualification: Unreviewed

Description

I got an error, when I do "symfony cc" and then refreshing a page using process cache, that I need to add path to sfProcessCache to eaccelerator.allowed_admin_path on line 166. Strange was, that this error occures, when I run the script first time after "symfony cc". The second time it wouldn't appear, even I call manually sfProcessCache::clear();

I discovered, that on this line is eaccelerator_clean(); This method also deletes eaccelerator's cached scripts, not only the cached data.

Therefore I modify my sfProcessCache::clear() like this starting at line 166:

      case 'eaccelerator':
        $keys = eaccelerator_list_keys();
        foreach ( $keys as $key)
        {
        	if ( !eaccelerator_rm(substr($key['name'], 1)) )
        	{
        		echo 'cannot clear';
        		return false;
        	}
        	
        }
        return true;

Change History

07/11/07 18:22:45 changed by adrive

I forgot to mention, that I remove a colon from the start of $key. which contains $keyname?. With the colon at the beginning of $keyname? eaccelerator_rm() will not remove cached key.

I use eaccelerator 0.95.1

12/07/07 15:13:36 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.
  • qualification set to Unreviewed.
  • milestone set to 1.0.10.

in r6358

12/07/07 15:14:39 changed by fabien

(In [6360]) fixed sfProcessCache eaccelerator delete also cached scripts not only cached data (closes #1964)

12/07/07 16:39:28 changed by Markus.Staab

why do you do such complicated comparisons like

return !(false === apc_fetch($this->prefix.$key))

and not in an much more easier way:

return true === apc_fetch($this->prefix.$key