refactored UNIQUE_PREFIX for caching ids