Caching
Cache management for API keys, the SmarterAuthToken model.
A user’s API keys are cached by smarter.lib.drf.models.cached_auth_tokens(), and the
cache is invalidated whenever an API key is saved or deleted. invalidate_all_cached_authtokens_for_user_profile()
also drops it explicitly, e.g. after a list view changed a key.
- smarter.lib.drf.caching.invalidate_all_cached_authtokens_for_user_profile(user_profile)[source]
Drop the cached API keys of a user profile’s user, for every profile of the user.
- Parameters:
user_profile (
UserProfile) – The user profile whose user’s API keys changed.- Return type: