Url cache fix

Fixes to ensure URL caching works for empty/nil keys