GoogleChrome / rendertron

A Headless Chrome rendering solution

Home Page:https://render-tron.appspot.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could we have a little more control over snapshotDir? I'd like a closure or adapter here

vesper8 opened this issue · comments

In my use-case I'm using a single instance of rendertron to cache and pre-cache multiple domains using the filesystem cache and I'm keeping a close eye on the generated json files. I'm actually monitoring them and warming up the cache by tracking it in a database table. Rather than use the default /tmp folder I've designated a cache folder that I can more easily monitor and alter if needed.

I'm now finding it inconvenient that the files from 10+ domains are all ending up in the same cache folder and would find it more useful if I could use some kind of closure, or option flag, so that the cache files were stored in a subfolder containing, for example, the domain name

So my cache folder would look like

~/_rendertron_cache/domain1.com/*.json
~/_rendertron_cache/domain2.com/*.json

Would be nice if something like that could be added : )

Many thanks!

In general, as we're deprecating the project, you should look into alternative approaches to rendering on the web.