Problem/Motivation

We are seeing a situation where the endpoint /api/1/archive/aggregate/theme/[theme_name]/relative
is somehow returning no results even though there are results, but then the 0 results get cached and it sits there returning incorrect data until the cache is cleared or expires.

It is not clear what is causing the transient 0 results in the first place, but we definitely do not want them cached.

There is a possibility that the 0 results is result of another api endpoint that looks similar but slightly different is getting cached with the same cache id as the main endpoint

In the event however that there are 0 results, we could skip caching them.

Acceptance Criteria

Testing steps

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

swirt created an issue. See original summary.

swirt’s picture

Title: empty response getting cached » Empty API response getting cached

  • swirt committed 6d90314f on 1.0.x
    fix #3609969 Improve api endpoint cacheing.
    
swirt’s picture

Status: Active » Fixed

This has been fixed and will go out to all three branches.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • swirt committed 02fc95c3 on 1.1.x
    fix #3609969 Improve api endpoint cacheing.
    

  • swirt committed 76b18f28 on 0.333.x
    fix #3609969 Improve api endpoint cacheing.
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.