Implement memory and disk caching for favicons

RESOLVED FIXED

Status

()

Firefox for iOS
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: wesj, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

46 bytes, text/x-github-pull-request
bnicholson
: review-
Details | Review | Splinter Review
(Reporter)

Description

4 years ago
Core data already gave us disk caching really. It would be nice to have a way to create a memory cache as well. My plan here is to create a cache protocol:

protocol Cache<key, value> {
  subscript[key] -> Value
  clear()
}

and then implement it a few different ways. The easiest can be an in memory LRU cache, but we can also implement a Disk cache using core data or sqlite. I then want to wrap them in a multi-cache object

class MultiCache: Cache {
  var caches: [Cache]
}

that can iterate through the list on get, set, and clear calls.
(Reporter)

Comment 1

4 years ago
Created attachment 8537497 [details] [review]
Pull request
Attachment #8537497 - Flags: review?(bnicholson)
It would be nice to get some tests for the utility classes you are adding here

Updated

4 years ago
Component: General → General
Product: Firefox for Android → Firefox for iOS
Comment on attachment 8537497 [details] [review]
Pull request

Several questions/comments in the PR. Also, I think you said something about splitting this up more.
Attachment #8537497 - Flags: review?(bnicholson) → review-
(Reporter)

Updated

4 years ago
Blocks: 1127032
(Reporter)

Comment 4

4 years ago
We have a disk cache now. I actually want to avoid a separate memory cache if we can for now...
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.