FriendsOfFlarum / sitemap

Generate a sitemap.
https://discuss.flarum.org/d/14941
MIT License
14 stars 16 forks source link

Added ability to cache to disk and to cache. #5

Closed luceos closed 4 years ago

luceos commented 4 years ago

Yeah I started out by just writing the urls to cache, but then added the file to the root too. I have the same reservations as you have, but file based access is always faster than proxying the request through php. Cronning the command will give you the best performance vs accuracy

Using the file plus cache is a great solution for scaled environments. If you prefer going without the file, let me know I am not swayed either way.

@jaspervriends perhaps?

clarkwinkelmann commented 4 years ago

When writing that I kind of forgot it's only creating the file when running the command, so if you don't use that feature then you don't get any xml created.

Would it make more sense to make two commands ? One to fill the cache, and another to create the file ? That way the behavior can be chosen ? Or just use a command flag like --write-xml-file

luceos commented 4 years ago

I like that, committed @clarkwinkelmann