Skip to content

Commit

Permalink
add option to delete (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
malmans2 authored Aug 2, 2024
1 parent 5981fd7 commit 4a5d289
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cads_worker/entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def _expire_cache_entries(
all_collections: Annotated[
bool, Option("--all-collections", help="Expire all collections")
] = False,
delete: Annotated[
bool, Option("--delete", help="Delete entries to expire")
] = False,
) -> int:
"""Expire cache entries."""
if (all_collections and collection_id) or not (all_collections or collection_id):
Expand All @@ -62,6 +65,7 @@ def _expire_cache_entries(
tags=None if all_collections else collection_id,
before=_add_tzinfo(before),
after=_add_tzinfo(after),
delete=delete,
)
typer.echo(f"Number of entries expired: {count}")
return count
Expand Down

0 comments on commit 4a5d289

Please sign in to comment.