cache:set¶
Cache an object expressed in JSON or string format.
Examples¶
cache:set my_cid "some value"cache:set my_cid '{"key": "value"}' default CACHE_PERMANENT node:1,user:2 --input-format=jsoncache:set my_cid - --input-format=json < value.json
Arguments¶
- cid. The id of the object to set.
- data. The object to set in the cache. Use - to read the object from STDIN.
- [bin]. The cache bin to store the object in.
- [expire]. 'CACHE_PERMANENT', or a Unix timestamp.
- [tags]. A comma delimited list of cache tags.
Options¶
- --input-format=INPUT-FORMAT. The format of value: string or json. Use json for complex values. [default: string]
Global Options¶
- -h, --help. Display help for the given command. When no command is given display help for the list command
- --silent. Do not output any message
- -q, --quiet. Only errors are displayed. All other output is suppressed
- -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
- -V, --version. Display this application version
- --ansi. Force (or disable --no-ansi) ANSI output
- --no-ansi. Negate the --ansi option.
- -n, --no-interaction. Do not ask any interactive question
- --url=URL. A base URL (e.g. example.com). Used for building links, selecting a multi-site, etc.
- -e, --env=ENV. The Environment name. [default: prod]
- --no-debug. Switches off debug mode.
Aliases¶
- cs
- cache-set
Legend
- An argument or option with square brackets is optional.
- Any default value is listed at end of arg/option description.
- An ellipsis indicates that an argument accepts multiple values separated by a space.