Opened 6 years ago

Last modified 5 years ago

#660 closed change

Switch to version 2 of the HTTP cache API — at Version 3

Reported by: trev Assignee:
Priority: P2 Milestone: Adblock-Plus-2.6.4-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: greiner, honzab, manvel@… Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by trev)


See, Mozilla is disabling version 1 of the HTTP cache API. We are currently using it in the blockable items list to determine whether we should show an image in the tooltip.

What to change

Switch to version 2 of the API, continue using version 1 as a fallback. Version 2 was enabled in, this one landed in Gecko 32. We will keep supporting older versions for a while still meaning that we need that fallback.

Change History (3)

comment:1 Changed 6 years ago by philll

  • Cc honzab added

comment:2 Changed 6 years ago by honzab

Some more info:

There is currently no simple way to detect the new cache is running, except a kinda hacky way, see [1]. Note that cacheIOTarget of the cache service version 1 will not throw when cache1 is off. The code at [1] can (should) be used to decide which of the two APIs to use.

Watch my blog [2] for more info on this. Next step is to remove cache1 code and interfaces altogether.


Last edited 6 years ago by honzab (previous) (diff)

comment:3 Changed 6 years ago by trev

  • Description modified (diff)

Thank you for the info. I was suspecting that HTTP cache v2 API wasn't usable immediately but I couldn't find the corresponding bug. So we can only drop the backwards compat code once we stop supporting anything below Gecko 32, good to know. Too bad that it has to happen in such a hacky way.

I guess we'll see your blog posts via Planet Mozilla, as before.

Note: See TracTickets for help on using tickets.