瀏覽代碼

Add new method documentation

havthgem 9 年之前
父節點
當前提交
affe8ab977
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20 0
      YYCache/YYCache.h

+ 20 - 0
YYCache/YYCache.h

@@ -68,7 +68,27 @@ FOUNDATION_EXPORT const unsigned char YYCacheVersionString[];
  */
 - (instancetype)initWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER;
 
+/**
+ Convenience Initializers
+ Create a new instance with the specified name.
+ Multiple instances with the same name will make the cache unstable.
+ 
+ @param name  The name of the cache. It will create a dictionary with the name in
+     the app's caches dictionary for disk cache. Once initialized you should not 
+     read and write to this directory.
+ @result A new cache object, or nil if an error occurs.
+ */
 + (instancetype)cacheWithName:(NSString *)name;
+
+/**
+ Convenience Initializers
+ Create a new instance with the specified name.
+ Multiple instances with the same name will make the cache unstable.
+ 
+ @param path  Full path of a directory in which the cache will write data.
+     Once initialized you should not read and write to this directory.
+ @result A new cache object, or nil if an error occurs.
+ */
 + (instancetype)cacheWithPath:(NSString *)path;
 
 - (instancetype)init UNAVAILABLE_ATTRIBUTE;