Closed Bug 1309836 Opened 8 years ago Closed 8 years ago

Need API to remove HTTP cache per origin for Storage management

Categories

(Core :: Networking: Cache, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: Fischer, Unassigned)

References

Details

(Whiteboard: [necko-backlog])

For the new Storage API standard [1] and the Storage management [2], Need API to remove HTTP cache per origin to let user remove site data of selected origin.
However, currently no such API in [3].

[1] The Storage API specs: https://storage.spec.whatwg.org/ 
[2] The UX specs: https://mozilla.invisionapp.com/share/4Y87EJO39#/screens/179635747_1-0_Cover
[3] https://dxr.mozilla.org/mozilla-central/source/netwerk/cache2/nsICacheStorageService.idl
Hi Francis,

It looks like we need,
1. The Http Cache team to help with the API
2. Discuss how to approach this on the Storage management project v1 schedule.

Thanks
Flags: needinfo?(frlee)
Blocks: 1309118
Junior, could you provide some suggestions?  Thanks.
Flags: needinfo?(frlee) → needinfo?(juhsu)
With some discussion with :schien, we can try nsICacheStorage::asyncDoomURI to evict the http cache.
Since asyncDoomURI is based on kinda exact matching without ref, you may need |asyncVisitStorage| to traversal all the cache and check if the cache is of the same schemeless origin group.

I have nothing to do with project schedule, so pass the ni back
Flags: needinfo?(juhsu) → needinfo?(frlee)
(In reply to Junior [:junior] from comment #3)
> With some discussion with :schien, we can try nsICacheStorage::asyncDoomURI
> to evict the http cache.
> Since asyncDoomURI is based on kinda exact matching without ref, you may
> need |asyncVisitStorage| to traversal all the cache and check if the cache
> is of the same schemeless origin group.
> 
> I have nothing to do with project schedule, so pass the ni back
Thanks.
I will try this.
wait for Fischer's feedback, remove my ni.
Flags: needinfo?(frlee)
Whiteboard: [necko-backlog]
(In reply to Junior [:junior] from comment #3)
> With some discussion with :schien, we can try nsICacheStorage::asyncDoomURI
> to evict the http cache.
> Since asyncDoomURI is based on kinda exact matching without ref, you may
> need |asyncVisitStorage| to traversal all the cache and check if the cache
> is of the same schemeless origin group.
> 
> I have nothing to do with project schedule, so pass the ni back

Successfully using nsICacheStorage::asyncVisitStorage to enum caches and pick out target caches.
And then remove target caches using nsICacheStorage::asyncDoomURI.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.