implement cache api in file object