瀏覽代碼

Improve documentation for cachePathForKey

onevcat 10 年之前
父節點
當前提交
a453804c54
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      Sources/ImageCache.swift

+ 5 - 2
Sources/ImageCache.swift

@@ -607,9 +607,12 @@ extension ImageCache {
     
     /**
     Get the cache path for the key.
-    It is useful for projects with UIWebView or anyone that needs access to the local file path
+    It is useful for projects with UIWebView or anyone that needs access to the local file path.
     
-    i.e. <img src='key'>
+    i.e. `<img src='path_for_key'>`
+     
+    - Note: This method does not guarantee there is an image already cached in the path. 
+      You could use `isImageCachedForKey` method to check whether the image is cached under that key.
     */
     public func cachePathForKey(key: String) -> String {
         let fileName = cacheFileNameForKey(key)