Closed kat-co closed 9 years ago
Yeah, templates are cached to speed up the generation, otherwise several templates need to be loaded from file when doing a single generation. If you want to see changes immediately after you updated some templates, you may clear the template cache by executing:
(setq op/item-cache nil)
Then the templates will be loaded from files again.
Thank you for the explanation. Would it make more sense to always load from disk at the beginning of the generation and then use the cached values throughout the process? The cost of parsing them once shouldn't be very great.
I also set force-all to true which I thought might force parsing the templates, so that was a little surprising as well.
Thanks for the great work, and answers to my questions.
Yeah, it is a great idea that update cache at the beginning of generation. I have updated the code, now the cache should be cleared before generation.
My workflow is:
But it looks as if the templates are cached in ht (i.e. op/get-cache-create). So my changes aren't reflected unless I use a new emacs process every time.