Move the write portion of fragment_for to its own method to allow for easier creation of custom cache methods.
Refactor cache fragment handling with read/write methods
Merge branch 'cache-fragment-refactor'

Closes #10819