Closed Bug 1112376 Opened 10 years ago Closed 9 years ago

Implement memory and disk caching for favicons

Categories

(Firefox for iOS :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: wesj, Unassigned)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
bnicholson
: review-
Details | Review
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.
Attached file Pull request
Attachment #8537497 - Flags: review?(bnicholson)
It would be nice to get some tests for the utility classes you are adding here
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-
Blocks: iosfavicons
We have a disk cache now. I actually want to avoid a separate memory cache if we can for now...
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: