Fixing storing of meta-data in cache, fixing optional param in Security