Skip to content
This repository was archived by the owner on Sep 12, 2022. It is now read-only.
This repository was archived by the owner on Sep 12, 2022. It is now read-only.

Cannot clear cache behind load balancer #4

@colinmollenhour

Description

@colinmollenhour

The current method of clearing the APC cache only works well for single-server setups. If the website is run on multiple nodes behind a load balancer then the current method cannot clear the cache on all nodes.

I suggest instead using a filesystem flag. E.g. when loading the APC cache attempt to delete a file named var/classpathcache.flag and if the delete fails then load from APC cache. To prevent another process from storing stale data, rather than immediately delete the APC cache just overwrite it with a new one.

E.g.:

if ( ! @unlink(Mage::getBaseDir('var').DS.'classpathcache.flag')) {
  // load apc_fetch results
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions