akileez / rendr

A personal static site generator
ISC License
2 stars 0 forks source link

buildStackLayout and frontMatter should use own cache #6

Closed akileez closed 9 years ago

akileez commented 9 years ago

at present, both functions are each using separate read functions to matter(gray-matter). This functionality should be consolidated.

akileez commented 9 years ago

both functions read files then put data to a cache. it would be nice if they could read from a cache as well. this would only be a benefit while running under watch(chokidar). In the case of frontMatter, it could use the same cache (or a clone) of loadTemplates preventing a double read of the same files at startup.

akileez commented 9 years ago

will revisit at another time.

akileez commented 9 years ago

slept on it..

akileez commented 9 years ago

set up both functions to use separate caches like dest function where they compare a local cache to object being passed in. add methods to deal with a object/file change (chokidar)

akileez commented 9 years ago

frontMatter cache implemented: https://github.com/akileez/rendr/commit/e1b197d34d87141531e64778242a910e54c55220

akileez commented 9 years ago

buildStackLayout cache implemented: https://github.com/akileez/rendr/commit/b6ba9deab321dcbd08be85ddfc1b0391a2238b1b