cache:clear

Introduction

cache:clear deletes feature entries from the cache, all of them or those of one namespace or one feature, in use or not. Then it removes the broken feature links in every product. To delete only what no product uses, run cache:prune instead.

splent cache:clear --feature splent_feature_notes@v1.0.0
⚠️  This will permanently delete the 1 entry/entries for feature 'splent_feature_notes@v1.0.0'. Continue? [y/N]: y
🧹 Cleared: 1 entry/entries for feature 'splent_feature_notes@v1.0.0'.
✅ No broken symlinks found.

The deletion cannot be undone. Check what goes with cache:status or cache:usage first.


Clearing one feature

splent cache:clear --feature splent_feature_notes

A bare name deletes the feature’s editable entry and every version, in every namespace. Add @<version> to delete one version. Put a namespace in front, as in splent-io/splent_feature_notes, to stay inside it.


Clearing a namespace

splent cache:clear --namespace splent_io

It deletes everything under splent_io/. splent-io names the same namespace.


Clearing the whole cache

splent cache:clear --yes

Without a scope it deletes all of .splent_cache/features/. --yes skips the confirmation.


Relinking what you still need

The command removes every broken link in the products’ features/ folders, including links broken for another reason, such as an editable checkout that moved. product:resolve or product:derive downloads and links again what a product declares. feature:clone downloads one feature.


Reference

Options

Option Description
--namespace NAMESPACE Only this namespace, such as splent_io or splent-io
--feature FEATURE Only this feature, as name, name@version or namespace/name[@version]
--yes Do not ask for confirmation

What each scope deletes

Options Deleted
(none) The whole .splent_cache/features/
--namespace splent_io Everything under splent_io/
--feature splent_feature_notes splent_feature_notes and every splent_feature_notes@<version>, in every namespace
--feature splent_feature_notes@v1.2.0 splent_feature_notes@v1.2.0 only, in every namespace
--feature splent-io/splent_feature_notes splent_feature_notes and every version, under splent_io/ only
--namespace splent_io --feature splent_feature_notes The same, under splent_io/ only

Errors

Situation Result
An empty value, or a path such as .., in --namespace or --feature Usage error, exit 2
--feature names a namespace other than --namespace Usage error, exit 2
Nothing matches, or the namespace is not in the cache A warning, exit 0
An entry cannot be deleted, such as a root-owned file a container wrote Could not delete <namespace>/<entry>: <error>, the others go on, exit 1 at the end

It never follows a symlink. A symlinked namespace named with --namespace is refused, --feature skips it, and clearing the whole cache only unlinks it. .splent_cache/spls/ is never touched.


Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es