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 (
stroryarl.URL) – The URL of the request.params (
dictorlistorstrorNone, optional) – The query parameters of the request. Default is None.data (
dictorNone, optional) – The data of the request. Default is None.json (
dictorNone, optional) – The JSON data of the request. Default is None.
- Returns:
str– The unique cache key based on the request details.- Return type: