Added preference caching
Merge pull request #1 from luuuke/master

Added preference caching