Com.webos.service.filecache documentation error?


Hello! I'm messing around with the filecache service, and I'm noticing an undocumented error return:

# luna-send -n 1 luna://com.webos.service.filecache/InsertCacheObject '{"typeName":"test","fileName":"test.txt","size":1024}'
{"errorCode":-200,"errorText":"InsertCacheObject: No type 'test' defined.","returnValue":false}

Clearly, from that error message, I need to call DefineType first. However, the documentation for DefineType says:

A DefineType ​method defines a new cache type. This is intended for use by the backup service.

which implies that it is something to be used by the "backup service", which is something that I don't think has been present since legacy webOS.

So, I think the documentation needs to be updated as to how to use DefineType and InsertCacheObject, and the error from InsertCacheObject should be added.



Hello ericblade,

The developer has updated filecache API doc.
Please, check the doc.