Inherits from NSObject
Conforms to RMTileCache
Declared in RMMemoryCache.h

Overview

An RMMemoryCache object represents memory-based caching of map tile images. Since memory is constrained in the iOS environment, this cache is relatively small, but useful for increasing performance.

Tasks

Initializing Memory Caches

Cache Capacity

Making Space in the Cache

Properties

capacity

The capacity, in number of tiles, that the memory cache can hold.

@property (nonatomic, readonly, assign) NSUInteger capacity

Discussion

The capacity, in number of tiles, that the memory cache can hold.

Declared In

RMMemoryCache.h

Instance Methods

initWithCapacity:

Initializes and returns a newly allocated memory cache object with the specified tile count capacity.

- (id)initWithCapacity:(NSUInteger)aCapacity

Parameters

aCapacity

The maximum number of tiles to be held in the cache.

Return Value

An initialized memory cache object or nil if the object couldn’t be created.

Discussion

Initializes and returns a newly allocated memory cache object with the specified tile count capacity.

Declared In

RMMemoryCache.h

makeSpaceInCache

Remove the least-recently used image from the cache if the cache is at or over capacity. This removes a single image from the cache.

- (void)makeSpaceInCache

Discussion

Remove the least-recently used image from the cache if the cache is at or over capacity. This removes a single image from the cache.

Declared In

RMMemoryCache.h