예제 #1
0
class HubsKeyConstructor(KeyConstructor):
    unique_method_id = bits.UniqueMethodIdKeyBit()
    unique_view_id = bits.UniqueViewIdKeyBit()
    format = bits.FormatKeyBit()
    language = bits.LanguageKeyBit()
    query_params = bits.QueryParamsKeyBit()
    pagination = bits.PaginationKeyBit()
예제 #2
0
class ObjectKeyConstructor(constructors.DefaultKeyConstructor):
    """Cache key generator for object/detail views."""
    retrieve_sql = bits.RetrieveSqlQueryKeyBit()
    updated_at = UpdatedAtKeyBit()
    kwargs = bits.KwargsKeyBit()
    params = bits.QueryParamsKeyBit()
    unique_view_id = bits.UniqueMethodIdKeyBit()
    format = bits.FormatKeyBit()
예제 #3
0
class USAspendingKeyConstructor(DefaultKeyConstructor):
    """
    Handle cache key construction for API requests. If we never need to create
    more nuanced keys, see the drf-extensions documentation:
    http://chibisov.github.io/drf-extensions/docs/#default-key-constructor
    """
    path_bit = PathKeyBit()
    request_params = GetPostQueryParamsKeyBit()
    unique_view_id = bits.UniqueMethodIdKeyBit()
예제 #4
0
class ListKeyConstructor(constructors.DefaultKeyConstructor):
    """Cache key generator for list views."""
    list_sql = bits.ListSqlQueryKeyBit()
    pagination = bits.PaginationKeyBit()
    updated_at = UpdatedAtKeyBit()
    kwargs = bits.KwargsKeyBit()
    params = bits.QueryParamsKeyBit()
    unique_view_id = bits.UniqueMethodIdKeyBit()
    format = bits.FormatKeyBit()
예제 #5
0
class CacheKeyConstructor(KeyConstructor):
    unique_view_id = bits.UniqueMethodIdKeyBit()
    args = bits.ArgsKeyBit()
    kwargs = bits.KwargsKeyBit()
    all_query_params = QueryListParamsKeyBit()
class PersonKeyConstructor(DefaultKeyConstructor):
    authenticated = AuthenticatedKeyBit()
    unique_view_id = bits.UniqueMethodIdKeyBit()
    format = bits.FormatKeyBit()
    route = bits.QueryParamsKeyBit()
예제 #7
0
class QueryParamsKeyConstructor(KeyConstructor):
    unique_method_id = bits.UniqueMethodIdKeyBit()
    all_query_params = bits.QueryParamsKeyBit()
예제 #8
0
class DefaultKeyConstructor(KeyConstructor):
    unique_method_id = bits.UniqueMethodIdKeyBit()
    format = bits.FormatKeyBit()
    language = bits.LanguageKeyBit()
예제 #9
0
class ShoutitDefaultCacheKeyConstructor(KeyConstructor):
    unique_method_id = bits.UniqueMethodIdKeyBit()
    format = bits.FormatKeyBit()
    language = bits.LanguageKeyBit()
    query_params = bits.QueryParamsKeyBit()