WeAreAthlon / Silla.IO

PHP Application Development Framework.
https://silla.io
GNU General Public License v3.0
25 stars 3 forks source link

Add CLI command for cache purge #46

Closed pnikolov closed 8 years ago

pnikolov commented 9 years ago

The command can be:

$ silla cache-purge

This should delete all contents of the following directories:

sandio commented 9 years ago
  1. How is a user of the command going to distinguish between the assets' cache and the cache used to store key-value pairs? Note: If the key-value cache is using the filesystem adapter, then the above would not be a problem (key-value pairs are stored in temp/cache). However, if the key-value cache is any other adapter, then the semantics of the above command are not that clear, in my opinion.
  2. What do you think about using a three-word commands silla cache purge, instead of silla cache-purge? This way other commands concerning the cache or any other component will fit intuitively.
  3. Generally, what do you think about using command flags, both with a long --flag and short -f version? This can be a separate issue of discussion.
pnikolov commented 9 years ago

I have not thought about the cache using different cache adapters... You are right the three word syntax is better. For example:

$ silla cache purge --all
$ silla cache purge --assets

etc.

pnikolov commented 8 years ago

@kalins can you share the latest code regarding this command?