Added preference caching