Add configurable option to cache API responses

Created on 24 October 2023, over 1 year ago

Problem/Motivation

API responses are currently not cached. This means that, when used wrong, an abundance of obsolete API calls could be made to Flexmail.

Steps to reproduce

Repeatedly use the same FlexmailApiManager method, and every time a request will be sent to Flexmail.

Proposed resolution

  1. Add static caching to all get methods in the FlexmailApiManager class for fast repeated API calls.
  2. Add configurable database caching to every get method. Make it configurable in duration where zero is no cache.
  3. Make POST methods clear the corresponding GET cache data. (when updating a Contact, clear getContact cache data)

Remaining tasks

See proposed solution.

User interface changes

The admin form of the Flexmail module allows to set a cache duration.

API changes

None.

Data model changes

None.

Feature request
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium fernly

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024