Toggle navigation
Toggle navigation
This project
Loading...
Sign in
尹诚
/
Mapbox-iOS-SDK
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Justin R. Miller
12 years ago
Commit
c3db4ca31942d7e10d309f4e0cb90110881d0426
1 parent
1cdf8cfe
added method for database cache file size retrieval
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
MapView/Map/RMDatabaseCache.h
MapView/Map/RMDatabaseCache.m
MapView/Map/RMDatabaseCache.h
View file @
c3db4ca
...
...
@@ -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
...
...
MapView/Map/RMDatabaseCache.m
View file @
c3db4ca
...
...
@@ -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);
...
...
Please
register
or
login
to post a comment