Closed Bug 582103 Opened 14 years ago Closed 14 years ago

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

Categories

(addons.mozilla.org Graveyard :: API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
5.11.8

People

(Reporter: clouserw, Assigned: jbalogh)

References

Details

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.
> We're getting is caching big chunks 

move along
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+
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)
(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
(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.
Target Milestone: 5.11.7 → 5.11.8
Assignee: nobody → dd
blocking2.0: beta4+ → beta5+
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.