Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

investigate NSURLCache #67

Closed
Closed

Description

@incanus

We should look into the use of NSURLCache, possibly with memory-based but definitely with disk-based caching instead of the disk-based, manually-managed caching we have now.

Both NSURLConnection (implicitly, through the use of NSURLRequest behavior and delegate callbacks) and NSURLSession (through a singleton setter) work with this API.

The API also allows easy use of multiple caches with the use of varying disk paths (see -[NSURLCache initWithMemoryCapacity:diskCapacity:diskPath:]) and removal based on NSURLRequest. For the latter, we'd need some code to translate between MKTileOverlayPath and NSURLRequest, but I think in the end we'd have a much simpler system. What we learn could be applied to the SDK as well as future work.

I don't think there's a good reason to use SQLite as we do in the SDK given threading and contention issues likely involved. Disk-based is probably the way to keep things.

Related: #46 #63 #66

Activity

  1. ghost added this to the 0.3.0 milestone on Mar 6, 2014
  2. ghost closed this as completedon Mar 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions