The API's {% cache %} needs to know about api_version

RESOLVED FIXED in 5.11.8

Status

RESOLVED FIXED
8 years ago
3 years ago

People

(Reporter: clouserw, Assigned: jbalogh)

Tracking

unspecified
5.11.8

Details

(Reporter)

Description

8 years ago
We're getting is caching big chunks of template code with "{% cache addon %}" but inside that block are if statements which change the output depending on api_version.  We need to tell the cache which api_version it's looking at so we don't get weird results.
(Reporter)

Comment 1

8 years ago
> We're getting is caching big chunks 

move along
(Reporter)

Comment 2

8 years ago
davedash is talking about adding context to {% cache %} so this stuff doesn't happen in the future.  I don't know how big of a job that is, but if it's big, we should make it a new bug.

Can this bug be fixed by putting the add-on and the api-version in a list before passing it to cache()?
This block bug 551274 which is currently a beta4 blocker. How does that sit with your release schedule?
Blocks: 551274
blocking2.0: --- → beta4+
(Reporter)

Comment 4

8 years ago
Beta 4 isn't on https://wiki.mozilla.org/Releases so I don't know what that schedule is.  What is the freeze date for it?
(In reply to comment #4)
> Beta 4 isn't on https://wiki.mozilla.org/Releases so I don't know what that
> schedule is.  What is the freeze date for it?

I would anticipate a release somewhere around 20th August (https://wiki.mozilla.org/Firefox/4/Beta)
(Reporter)

Comment 6

8 years ago
(In reply to comment #5)
> (In reply to comment #4)
> > Beta 4 isn't on https://wiki.mozilla.org/Releases so I don't know what that
> > schedule is.  What is the freeze date for it?
> 
> I would anticipate a release somewhere around 20th August
> (https://wiki.mozilla.org/Firefox/4/Beta)

We'll be good
(Assignee)

Comment 7

8 years ago
(In reply to comment #2)
> davedash is talking about adding context to {% cache %} so this stuff doesn't
> happen in the future.  I don't know how big of a job that is, but if it's big,
> we should make it a new bug.

The only context it takes into account is request.APP.  There isn't a way to add other variants to the cache string right now.

> Can this bug be fixed by putting the add-on and the api-version in a list
> before passing it to cache()?

No.
(Reporter)

Updated

8 years ago
Target Milestone: 5.11.7 → 5.11.8
Assignee: nobody → dd
blocking2.0: beta4+ → beta5+
(Assignee)

Updated

8 years ago
Assignee: dd → jbalogh
Whiteboard: [r?davedash] → [r?davedash][qa-]
Whiteboard: [r?davedash][qa-] → [qa-]
Actually this is qa'able... albeit difficult

You should be able to oscillate between 1.2 and 1.5 API and verify that they are indeed different and behaving according to their individual specs.

The problem was we'd cache pages with a key based on the template filename alone, and not on the URL, so since 1.5 and 1.2 used the same template file... we'd get a cache namespace collision.
Whiteboard: [qa-]
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.