further refactorings to fixup caching. implement conditional caching (304 not modified)