Request getting data from apsis contains no caching. This results in a request to the Apsis API each time a page is loaded, that contains eg. the signup block.

I suggest adding cache, both static and using the cache backend.

Comments

mian3010 created an issue. See original summary.

mian3010’s picture

StatusFileSize
new5.76 KB

Attached proposed solution

kasperg’s picture

StatusFileSize
new3.37 KB

Here is an updated version of the change.

Instead of adding cache logic into the individual methods we instead use a wrapper around the request method.

mian3010’s picture

StatusFileSize
new2.62 KB

It seems that it is a bad idea to cache getSubscriberMailingLists, as when a user removes subscription, the display would not update until cache had expired.

  • Snipon committed 16f106f on 8.x-1.x
    Issue #2816733 by mian3010 and kasperg: Get requests not cached.
    
Snipon’s picture

Status: Active » Fixed
Snipon’s picture

Status: Fixed » Closed (fixed)