goflow2 icon indicating copy to clipboard operation
goflow2 copied to clipboard

Externalising template cache

Open shyam334 opened this issue 4 years ago • 3 comments

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!

shyam334 avatar Aug 24 '21 05:08 shyam334

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.

lspgn avatar Aug 24 '21 05:08 lspgn

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.

shyam334 avatar Aug 24 '21 06:08 shyam334

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.

lspgn avatar Nov 01 '21 01:11 lspgn

I believe this is solved in v1.2.1

lspgn avatar Apr 16 '23 03:04 lspgn