pygeoogc.cache_keys#
Functions for creating unique keys based on web request parameters.
This module is based on the aiohttp-client-cache
package, which is
licensed under the MIT license. See the LICENSE
file for more details.
Module Contents#
- pygeoogc.cache_keys.create_request_key(method, url, params=None, data=None, json=None)#
Create a unique cache key based on request details.
- Parameters:
method (
str
) – The HTTP method used in the request. Must be either “GET” or “POST”.url (
str
oryarl.URL
) – The URL of the request.params (
dict
orlist
orstr
orNone
, optional) – The query parameters of the request. Default is None.data (
dict
orNone
, optional) – The data of the request. Default is None.json (
dict
orNone
, optional) – The JSON data of the request. Default is None.
- Returns:
str
– The unique cache key based on the request details.- Return type: