added check if is cdn url to prevent having to create the cache dir