Skip to main content

cache_clear_handler

Function cache_clear_handler 

Source
pub async fn cache_clear_handler<A: DatabaseAdapter>(
    __arg0: State<AppState<A>>,
    __arg1: Json<CacheClearRequest>,
) -> Result<Json<ApiResponse<CacheClearResponse>>, ApiError>
Expand description

Clear cache entries by scope.

Supports three clearing scopes:

  • all: Clear all cache entries
  • entity: Clear entries for a specific entity type
  • pattern: Clear entries matching a glob pattern

ยงErrors

Returns ApiError with an internal error if the cache feature is not enabled. Returns ApiError with a validation error if required parameters are missing or scope is invalid.

Requires admin token authentication.