{"action":"created","issue":{"url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/issues/69","repository_url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController","labels_url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/issues/69/comments","events_url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/issues/69/events","html_url":"https://github.com/Roobiq/RBQFetchedResultsController/issues/69","id":137991174,"number":69,"title":"Best practice for multi-users with encrypted realm FRC cache","user":{"login":"jasper-chan","id":7690906,"avatar_url":"https://avatars.githubusercontent.com/u/7690906?v=3","gravatar_id":"","url":"https://api.github.com/users/jasper-chan","html_url":"https://github.com/jasper-chan","followers_url":"https://api.github.com/users/jasper-chan/followers","following_url":"https://api.github.com/users/jasper-chan/following{/other_user}","gists_url":"https://api.github.com/users/jasper-chan/gists{/gist_id}","starred_url":"https://api.github.com/users/jasper-chan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasper-chan/subscriptions","organizations_url":"https://api.github.com/users/jasper-chan/orgs","repos_url":"https://api.github.com/users/jasper-chan/repos","events_url":"https://api.github.com/users/jasper-chan/events{/privacy}","received_events_url":"https://api.github.com/users/jasper-chan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-02T21:00:37Z","updated_at":"2016-03-03T13:37:43Z","closed_at":null,"body":"I'm currently using your FRC in a platform that supports multiple users. Encryption is also turned on for realm. I noticed that if I logged out, and tried to log in as a different user, an exception stating the wrong encryption key is being used to open the cache. I tried calling deleteCacheWithName and passing in nil to delete everything, but then another exception: \r\n\r\n```\r\nTerminating app due to uncaught exception 'RLMException', reason: 'Realm at path '/Users/jasperchan/Library/Developer/CoreSimulator/Devices/60242241-EB72-4C8C-A7DA-8D017E03F860/data/Containers/Data/Application/540996A9-147F-4AAC-B9CA-EB03A50B4AE5/Documents/RBQFetchedResultsControllerCache/sceneFileCache/sceneFileCache.realm' already opened with different encryption key'\r\n```\r\n\r\nI was hoping if you could provide the best practice using this FRC to resolve this issue. Thanks"},"comment":{"url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/issues/comments/191763485","html_url":"https://github.com/Roobiq/RBQFetchedResultsController/issues/69#issuecomment-191763485","issue_url":"https://api.github.com/repos/Roobiq/RBQFetchedResultsController/issues/69","id":191763485,"user":{"login":"jasper-chan","id":7690906,"avatar_url":"https://avatars.githubusercontent.com/u/7690906?v=3","gravatar_id":"","url":"https://api.github.com/users/jasper-chan","html_url":"https://github.com/jasper-chan","followers_url":"https://api.github.com/users/jasper-chan/followers","following_url":"https://api.github.com/users/jasper-chan/following{/other_user}","gists_url":"https://api.github.com/users/jasper-chan/gists{/gist_id}","starred_url":"https://api.github.com/users/jasper-chan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasper-chan/subscriptions","organizations_url":"https://api.github.com/users/jasper-chan/orgs","repos_url":"https://api.github.com/users/jasper-chan/repos","events_url":"https://api.github.com/users/jasper-chan/events{/privacy}","received_events_url":"https://api.github.com/users/jasper-chan/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T13:37:43Z","updated_at":"2016-03-03T13:37:43Z","body":"I would agree with you that it would defeat the purpose of encryption, but thanks for doing the PR!\r\n\r\nI'll try without using cache and see what the performance is like. Have you done any performance testing between in-memory and cache?\r\n\r\nThanks!"}}