| @@ -6,9 +6,8 @@ | ||
| 6 | 6 | */ |
| 7 | 7 | |
| 8 | 8 | namespace Activitypub\Cli; |
| 9 | 9 | |
| 10 | -use Activitypub\Cache; | |
| 11 | 10 | use Activitypub\Cache\Avatar; |
| 12 | 11 | use Activitypub\Cache\Emoji; |
| 13 | 12 | use Activitypub\Cache\File; |
| 14 | 13 | use Activitypub\Cache\Media; |
| @@ -210,9 +209,9 @@ | ||
| 210 | 209 | foreach ( $subdirs as $subdir ) { |
| 211 | 210 | File::delete_directory( $subdir ); |
| 212 | 211 | } |
| 213 | 212 | |
| 214 | - // Clean up legacy avatar URL meta from previous versions. | |
| 213 | + // Also clear avatar URL meta for avatar cache. | |
| 215 | 214 | if ( 'avatar' === $type ) { |
| 216 | 215 | \delete_metadata( 'post', 0, '_activitypub_avatar_url', '', true ); |
| 217 | 216 | } |
| 218 | 217 | |
| @@ -264,9 +263,9 @@ | ||
| 264 | 263 | * @return bool True if enabled. |
| 265 | 264 | */ |
| 266 | 265 | private function is_cache_enabled( $type ) { |
| 267 | 266 | // Check global cache enablement (includes constant and activitypub_remote_cache_enabled filter). |
| 268 | - if ( ! Cache::is_enabled() ) { | |
| 267 | + if ( ! \Activitypub\Cache::is_enabled() ) { | |
| 269 | 268 | return false; |
| 270 | 269 | } |
| 271 | 270 | |
| 272 | 271 | // Check type-specific filter. |