Преглед на файлове

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.
     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 {
     public func cachePathForKey(key: String) -> String {
         let fileName = cacheFileNameForKey(key)
         let fileName = cacheFileNameForKey(key)