eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 314 forks source link

Build the list of pages only once #137

Open jammon opened 9 years ago

jammon commented 9 years ago

Site.pages() reads the list of pages every time it is called. I don't think, that it's meant to be like that.

krallin commented 9 years ago

I think this would break the cactus serve command (@koenbok did most of the work on it, so I'm not sure).

It used to work the way you're describing it, but was changed here: https://github.com/koenbok/Cactus/commit/c297ad1590e2ff6176bb84b1c79d18a1389d32e4

So, I'd avoid merging this for now until Koen can clarify the intention in that change.

Cheers,

jammon commented 9 years ago

Probably you are right. I found a situation (after some more code changes) that a seemingly unrelated test failed, because it relied implicitly on the files being read for every call to site.pages(). Can I take this pull request back?