Skip to main content

clearcache

汇总

执行特定于云的文件相关操作。

讨论

此类无法直接实例化。 由 AIOFile 对象的 cloud 属性返回此类的实例。

语法

clearcache()

方法

clearcache()

清除文件属性和 BLOB 区域缓存。 在外部进程更新文件时调用此方法。

cloud_io = AIO(r"C:\data\datacloud.acs")
rcsfile = cloud_io.open(r'testfile.txt', 'r')
rcsfile.cloud.clearcache()

usebufferedreader()

缓存上次读取的字节。

cloud_io = AIO(r"C:\data\datacloud.acs")
rcsfile = cloud_io.open(r'testfile.txt', 'r')
rcsfile.cloud.usebufferedreader()

usecachedfile({blocksize}, {cachesize})

使用最近最少使用 (LRU) 的块缓存处理云端文件。

名称 说明 数据类型

blocksize

(可选)

The block size.

(默认值为 32768)

Integer

cachesize

(可选)

The cache size.

(默认值为 0)

Integer

cloud_io = AIO(r"C:\data\datacloud.acs")
rcsfile = cloud_io.open(r'testfile.txt', 'r')
rcsfile.cloud.usecachedfile(blocksize=32768, cachesize=0)