bustoutsolutions / siesta

The civilized way to write REST API clients for iOS / macOS
https://bustoutsolutions.github.io/siesta/
MIT License
2.19k stars 159 forks source link

File-based caching for Siesta #289

Open jordanpwood opened 5 years ago

jordanpwood commented 5 years ago

I find myself needing a file-based cache for Siesta. I see that there is a branch named file-cache in the repo. It's my understanding that this is the beginning of a file caching system for Siesta, correct? Is it a dead end with serious problems, or simply unfinished work? If the latter, what still needs to be done? If it fits the requirements I have for a file cache, I could work on it and make a PR, but I'd like to know more about how you envision it working @pcantrell, and what things need to happen before it is ready to be used. Let me know!

pcantrell commented 5 years ago

It is very much ready for experiments! It has a couple of subtle issues I wanted to fix before merging, but it is certainly not a dead end. On the run now, but I’ll drop some notes about those “subtle issues” when I have a little more time.

pcantrell commented 5 years ago

P.S. The GithubBrowser project on that branch has an example of how to configure and use it: https://github.com/bustoutsolutions/siesta/blob/file-cache/Examples/GithubBrowser/Source/API/GithubAPI.swift#L40-L67

ahknight commented 5 years ago

Any update on this? It is, unfortunately, not a drop-in class for the release version of the framework due to method signature changes (which are beneficial, just breaking).

tkirby commented 5 years ago

Is there an updated Filecache.swift that works with latest Siesta version? I tried the one from the file-cache branch but it's giving this error in a few places:

FileCache' does not conform to protocol 'EntityCache'