Externalising template cache
The feature request is to have the ability to externalise the template cache, such that when goflow restarts, it can immediately pick up the cache and serve the data. (minimising recovery time)
As an extension, perhaps we could use the mechanism to create a HA solution, but I'd think that's a seperate piece of work.
Noticed that there is already some work done in the related area.
What are your thoughts.
P.S. Great to see the project being actively developed!
Hi @shyam334 Yes that is a good idea. What backend implementation are you thinking of? Besides local files, maybe Redis could do? Along with this, expiration of templates should be added.
The endpoint you found was more for debugging and haven't had time to migrate it during the move to GoFlow2.
Redis and files sounds good. And yeah, all the caveats that comes with caching.
Noticed some mention of expiry in the ~~old RFC https://datatracker.ietf.org/doc/html/rfc5153#section-6.2 , and~~ new RFC https://datatracker.ietf.org/doc/html/rfc7011#section-8.4 to 9.4.
For #49 I went with a similar design I used with Format and Transports.
Right now there is only a sample with Memory which could be used as a base for a file/http/redis (warm memory up with cached data during Init then push to cache every time an update is added)
Not sure how much time I'll have to do a Redis template module but happy to merge some PRs.
I believe this is solved in v1.2.1