complete rewrite of url caching