CacheInstallCommand class
dox cache:install [--store=file|redis|memory|database]. dox add cache
runs it. It sets up the cache config, the .env keys and the AppEnv
getters. With --store=database it also adds dox_cache_database, its
provider and the cache table migration.
It never overwrites a file, so it is safe to run twice.
Constructors
- CacheInstallCommand({Directory? root, ProcessRunner? runner})
-
rootis the app folder (the current folder by default).runnerrunsdart, tests pass a fake one.
Properties
- description → String
-
one line for
dox helpno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
the name after
dox, likequeue:tableno setter - root → Directory?
-
final
- runner → ProcessRunner?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- usage → String
-
how to call it, like
make:report <name>. Shown bydox help. The default is name.no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
List< String> args) → Future<void> -
run the command.
argsare the words after the name. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
cacheConfig(
String app, String store) → String -
lib/config/cache.dart, the same as the app template. Theredisanddatabasestores are added whenstoreis one of them. -
envGetters(
String store) → List< String> -
the getters of
AppEnvthatlib/config/cache.dartreads -
envKeys(
String store) → Map< String, String> -
the
.envkeys ofstore
Constants
- cacheProvider → const String
-
lib/providers/cache_provider.dart, turns on the database driver - cacheTableMigration → const String
-
the migration of the cache table, the same as
dox cache:tablemakes. It is a copy ofCacheTableCommand.source()in dox_cache_database (dox-orm repo), which dox_cache can not import. Keep the two the same. -
stores
→ const List<
String>