First of all wanna thank you for this utility gem! Just wanna share some constructive suggestions.
I believe period: 0 should be the default. A very common case is to get a result (here we wanna enforce a period), and to have an "update" get for the result (where it's very important to have NO period as updates could happen at any time) As a result in my code I cannot use :period at all, cause the :period set when I "get" is gonna block me from making updates (which might happen soon after)
Hope that makes sense. In short I suggest:
- make
period: 0 the default
- Add an option to ignore the period, perhaps
ignore_period: true (this would allow one to "update" at anytime while still having a period for actual fetches)
EDIT: Actually I realized that I didn't have to wrap my update request at all - just needed to delete the local cache after the update, so the "option to ignore period" prob isn't as useful as I thought... still think period should default to 0 to reduce confusion tho
First of all wanna thank you for this utility gem! Just wanna share some constructive suggestions.
I believe
period: 0should be the default. A very common case is togeta result (here we wanna enforce a period), and to have an "update"getfor the result (where it's very important to have NO period as updates could happen at any time) As a result in my code I cannot use:periodat all, cause the:periodset when I "get" is gonna block me from making updates (which might happen soon after)Hope that makes sense. In short I suggest:
period: 0the defaultignore_period: true(this would allow one to "update" at anytime while still having a period for actual fetches)EDIT: Actually I realized that I didn't have to wrap my update request at all - just needed to delete the local cache after the update, so the "option to ignore period" prob isn't as useful as I thought... still think period should default to 0 to reduce confusion tho