You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My expectation of the way cache should work (it's a little unclear from the docs) is that the cache is a local cache, and @powersync/attachments should manage the size. The full set of current (not-orphaned/archived) data should remain on remote.
In testing, I found that if cacheLimit is set to a low value, e.g., 2, then only 2 items are preserved in (remote) storage.
So the cacheLimit effectively applies to both local and remote files.
Inspecting the source seems to confirm this -
The delete method deletes from both local and remote:
My expectation of the way cache should work (it's a little unclear from the docs) is that the cache is a local cache, and @powersync/attachments should manage the size. The full set of current (not-orphaned/archived) data should remain on remote.
In testing, I found that if cacheLimit is set to a low value, e.g., 2, then only 2 items are preserved in (remote) storage.
So the cacheLimit effectively applies to both local and remote files.
Inspecting the source seems to confirm this -
The delete method deletes from both local and remote:
powersync-js/packages/attachments/src/AbstractAttachmentQueue.ts
Lines 224 to 250 in ba72a58
delete()is called fromexpire()to delete the oldest synced or archived attachment:powersync-js/packages/attachments/src/AbstractAttachmentQueue.ts
Lines 513 to 531 in ba72a58
Am I missing something here?