CDPotion.Domain.CacheStorage (cdpotion v0.1.4)
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:
- (Required)
cache_id
: Id of cache for deletion.
Link to this function
delete_entry(cache_id, request)
Deletes a cache entry.
Parameters:
- (Required)
cache_id
: Id of cache where the entry will be deleted. - (Required)
request
: URL spec of the request.
Link to this function
request_cache_names(security_origin \\ nil, storage_key \\ nil, storage_bucket \\ nil)
@spec request_cache_names( String.t(), String.t(), CDPotion.Domain.Storage.storage_bucket() ) :: {String.t(), map()}
Requests cache names.
Parameters:
- (Optional)
security_origin
: At least and at most one of securityOrigin, storageKey, storageBucket must be specified. Security origin. - (Optional)
storage_key
: Storage key. - (Optional)
storage_bucket
: 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:
- (Required)
cache_id
: Id of cache that contains the entry. - (Required)
request_url
: URL spec of the request. - (Required)
request_headers
: 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:
- (Required)
cache_id
: ID of cache to get entries from. - (Optional)
skip_count
: Number of records to skip. - (Optional)
page_size
: Number of records to fetch. - (Optional)
path_filter
: If present, only return the entries containing this substring in the path