Authored by Justin R. Miller

added method for database cache file size retrieval

... ... @@ -73,4 +73,7 @@
* @param theExpiryPeriod The amount of time to elapse before a tile should be removed from the cache. If set to zero, tile count-based purging will be used instead of time-based. */
- (void)setExpiryPeriod:(NSTimeInterval)theExpiryPeriod;
/** The current file size of the database cache on disk. */
- (unsigned long long)fileSize;
@end
... ...
... ... @@ -178,6 +178,11 @@
srand(time(NULL));
}
- (unsigned long long)fileSize
{
return [[[NSFileManager defaultManager] attributesOfItemAtPath:self.databasePath error:nil] fileSize];
}
- (UIImage *)cachedImage:(RMTile)tile withCacheKey:(NSString *)aCacheKey
{
// RMLog(@"DB cache check for tile %d %d %d", tile.x, tile.y, tile.zoom);
... ...