CDPotion.Domain.CacheStorage (cdpotion v0.1.1)
Summary
Types
Cache identifier.
Unique identifier of the Cache object.
Cached response
type of HTTP response cached
Data entry.
description not provided :(
Functions
Deletes a cache.
Deletes a cache entry.
Requests cache names.
Fetches cache entry.
Requests data from cache.
Types
Link to this type
cache()
@type cache() :: %{ cacheId: cache_id(), cacheName: String.t(), securityOrigin: String.t(), storageBucket: CDPotion.Domain.Storage.storage_bucket() | nil, storageKey: String.t() }
Cache identifier.
Link to this type
cache_id()
@type cache_id() :: String.t()
Unique identifier of the Cache object.
Link to this type
cached_response()
@type cached_response() :: %{body: String.t()}
Cached response
Link to this type
cached_response_type()
@type cached_response_type() ::
:basic | :cors | :default | :error | :opaqueResponse | :opaqueRedirect
type of HTTP response cached
Link to this type
data_entry()
@type data_entry() :: %{ requestHeaders: [header()], requestMethod: String.t(), requestURL: String.t(), responseHeaders: [header()], responseStatus: integer(), responseStatusText: String.t(), responseTime: number(), responseType: cached_response_type() }
Data entry.
Link to this type
header()
description not provided :(
Functions
Link to this function
delete_cache(cache_id)
Deletes a cache.
Parameters:
cacheId:CacheId: Id of cache for deletion.
Link to this function
delete_entry(cache_id, request)
Deletes a cache entry.
Parameters:
cacheId:CacheId: Id of cache where the entry will be deleted.request:string: URL spec of the request.
Link to this function
request_cache_names(security_origin \\ nil, storage_key \\ nil, storage_bucket \\ nil)
Requests cache names.
Parameters:
securityOrigin:string: (Optional) At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin.storageKey:string: (Optional) Storage key.storageBucket:Storage.StorageBucket: (Optional) Storage bucket. If not specified, it uses the default bucket.
Link to this function
request_cached_response(cache_id, request_url, request_headers)
Fetches cache entry.
Parameters:
cacheId:CacheId: Id of cache that contains the entry.requestURL:string: URL spec of the request.requestHeaders:array: headers of the request.
Link to this function
request_entries(cache_id, skip_count \\ nil, page_size \\ nil, path_filter \\ nil)
Requests data from cache.
Parameters:
cacheId:CacheId: ID of cache to get entries from.skipCount:integer: (Optional) Number of records to skip.pageSize:integer: (Optional) Number of records to fetch.pathFilter:string: (Optional) If present, only return the entries containing this substring in the path