1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/modules/api_cache.py.md
Stefan Pratter b7bfd631a3 Support 202208 (#1240)
* Make it possible to display the TOTP secret in text form instead of QR code only #947

* Show username *and* email address when user is logged in #484

* fix asn auto tool #959

* Trigger IX-F import when network sets allow_ixp_update to "yes" #499

* Ops: Log Melissa payload in django.log #1150

* Error-handling of failed creation of DeskPRO ticket #981

* email management changes #267 #736 #737 #738 #907

* block api write operations when using basic-auth to authenticate an MFA enabled account

* add robots txt #1213

* DB clean-up of elderly ophaned user accounts #380

* linting

* fix migrations

* fix tests

* dont flag new users for deletion

* linting

* docs

Co-authored-by: dpoarch <dpoarch@20c.com>
2022-09-12 16:29:28 +03:00

68 lines
1.1 KiB
Markdown

Generated from api_cache.py on 2022-09-12 13:25:46.155090
# peeringdb_server.api_cache
Handle loading of api-cache data.
# Classes
---
## APICacheLoader
```
APICacheLoader(builtins.object)
```
Checks if an API GET request qualifies for a cache load
and if it does allows you to provide the cached result.
### Methods
#### \__init__
`def __init__(self, viewset, qset, filters)`
Initialize self. See help(type(self)) for accurate signature.
---
#### filter_fields
`def filter_fields(self, row)`
Remove any unwanted fields from the resultset
according to the `fields` filter specified in the request.
---
#### load
`def load(self)`
Load the cached response according to tag and depth.
---
#### qualifies
`def qualifies(self)`
Check if request qualifies for a cache load.
---
## CacheRedirect
```
CacheRedirect(builtins.Exception)
```
Raise this error to redirect to cache response during viewset.get_queryset
or viewset.list()
Argument should be an APICacheLoader instance.
### Methods
#### \__init__
`def __init__(self, loader)`
Initialize self. See help(type(self)) for accurate signature.
---