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
Results from the Moneybird API are easily cacheable because of the synchronization API and because most (all?) entities have a version attribute. It would therefore make sense to integrate support for a PSR-6 compatible cache into this package to speed up queries and prevent users from making too many requests to the API.
Preferable, the user could specify a prefix for the cache key.
This would require the following work to be done:
Adding version to the attribute list of all entities that support synchronization.
Checking if all entities that support synchronization actally use the Synchronize trait.
Updating the getAll() method to load items from and save items to the cache if the entity supports synchronization.
Currently, it is possible to implement something similar using the following code. However, this requires modifying the output of the ->attributes() method, which does not return raw data that can cached and used with ->collectionFromResult(...) later.
Results from the Moneybird API are easily cacheable because of the synchronization API and because most (all?) entities have a version attribute. It would therefore make sense to integrate support for a PSR-6 compatible cache into this package to speed up queries and prevent users from making too many requests to the API.
Preferable, the user could specify a prefix for the cache key.
This would require the following work to be done:
version
to the attribute list of all entities that support synchronization.Synchronize
trait.getAll()
method to load items from and save items to the cache if the entity supports synchronization.Currently, it is possible to implement something similar using the following code. However, this requires modifying the output of the
->attributes()
method, which does not return raw data that can cached and used with->collectionFromResult(...)
later.The text was updated successfully, but these errors were encountered: