Caching

Cached querysets of the vectorstores that a user may see: those they own, those shared with.

them, and both. A vectorstore’s post_save and post_delete receivers invalidate its owner’s.

smarter.apps.vectorstore.caching.get_cached_vectorstores_available_to_user_profile(user_profile)[source]

The vectorstores that the user may read: owned and shared.

Return type:

QuerySet

smarter.apps.vectorstore.caching.get_cached_vectorstores_owned_by_user_profile(user_profile)[source]

The vectorstores that the user owns.

Return type:

QuerySet

smarter.apps.vectorstore.caching.get_cached_vectorstores_shared_with_user_profile(user_profile)[source]

The vectorstores shared with the user: their account’s, and the platform’s.

Return type:

QuerySet

smarter.apps.vectorstore.caching.invalidate_all_cached_vectorstores_for_user_profile(user_profile)[source]

Invalidate the user’s cached vectorstores.

Return type:

None