yii2: Flushing cache not working for ApcCache

I used yii\filters\PageCache to cache some actions and ApcCache is being used. When i run yii cache/flush-all, the page is still cached. I even cleared the runtime folder and still nothing.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Documented.

This definitely should be documented. AFAIK APC(u) cache doesn’t really work in CLI, because CLI process can not share cache with other process. So each command use only cache which itself generated.

http://stackoverflow.com/questions/12860487/is-apc-opcode-cache-shared-between-php-fpm-pools-workers

Internet has a lot of discussions that calling apc_cache_clear() in CLI does not clear opcode caches from “web” PHP processes, whether they are run inside Apache or by FPM (see How to clear APC cache entries? ). As a suggested solution, it’s possible to create a simple PHP page that calls apc_cache_clear(), and call that from CLI.