Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clear-caches console command #3588

merged 14 commits into from Dec 28, 2018


None yet
2 participants
Copy link

commented Dec 22, 2018

This adds a clear-caches console command that mirrors the functionality provided in the GUI Clear Caches utility.

It works with all of the built-in Craft caches, as well as any third party caches that are registered:

- clear-caches                                          Clear caches via the CLI
    clear-caches/all                                    Clear all caches
    clear-caches/asset                                  Asset caches
    clear-caches/asset-indexing-data                    Asset indexing data
    clear-caches/compiled-templates                     Removes all of a directory’s contents recursively.
    clear-caches/cp-resources                           Control Panel resources
    clear-caches/data                                   Deletes all values from cache.
    clear-caches/fastcgi-cache-bust                     FastCGI Cache
    clear-caches/retour-redirect-caches                 Invalidate all of the redirects caches
    clear-caches/route-map                              Route Map Cache
    clear-caches/seomatic-frontendtemplate-caches       Invalidate all of the frontend template caches
    clear-caches/seomatic-metabundle-caches             Invalidate all of the meta container caches
    clear-caches/seomatic-sitemap-caches                Invalidate all of the sitemap caches
    clear-caches/temp-files                             Removes all of a directory’s contents recursively.
    clear-caches/template-caches                        Deletes all the template caches.
    clear-caches/transform-indexes                      Asset transform index


khalwat added some commits Apr 21, 2017

Add support for PGPASSFILE with pg_dump
Signed-off-by: Andrew Welch <>
Merge remote-tracking branch 'upstream/develop' into develop
Signed-off-by: Andrew Welch <>

# Conflicts:
#	src/db/pgsql/Schema.php
Add clear-caches console command
Signed-off-by: Andrew Welch <>
Updated to P&T comment blocks
Signed-off-by: Andrew Welch <>
Change ::t category to ‘app’
Signed-off-by: Andrew Welch <>
Rearrange public/protected method ordering
Signed-off-by: Andrew Welch <>

This comment has been minimized.

Copy link

commented Dec 28, 2018

There are some merge conflicts in src/db/pgsql/Schema.php.

Also DynamicAction should probably be renamed to ClearCacheAction.

khalwat added some commits Dec 28, 2018

Sync to upstream
Signed-off-by: Andrew Welch <>
Rename DynamicAction -> ClearCacheAction
Signed-off-by: Andrew Welch <>

This comment has been minimized.

Copy link
Contributor Author

commented Dec 28, 2018

I synced the file src/db/pgsql/Schema.php to the upstream version

Also renamed DynamicAction to ClearCacheAction.

@brandonkelly brandonkelly merged commit ae6830c into craftcms:develop Dec 28, 2018

1 check was pending

Scrutinizer Analysis: Running – Tests: pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.