{"action":"created","issue":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5657","labels_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5657/labels{/name}","comments_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5657/comments","events_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5657/events","html_url":"https://github.com/OrchardCMS/Orchard/issues/5657","id":101710723,"number":5657,"title":"SysCache really should not be a feature","user":{"login":"DanielStolt","id":3889090,"avatar_url":"https://avatars.githubusercontent.com/u/3889090?v=3","gravatar_id":"","url":"https://api.github.com/users/DanielStolt","html_url":"https://github.com/DanielStolt","followers_url":"https://api.github.com/users/DanielStolt/followers","following_url":"https://api.github.com/users/DanielStolt/following{/other_user}","gists_url":"https://api.github.com/users/DanielStolt/gists{/gist_id}","starred_url":"https://api.github.com/users/DanielStolt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanielStolt/subscriptions","organizations_url":"https://api.github.com/users/DanielStolt/orgs","repos_url":"https://api.github.com/users/DanielStolt/repos","events_url":"https://api.github.com/users/DanielStolt/events{/privacy}","received_events_url":"https://api.github.com/users/DanielStolt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-18T17:45:14Z","updated_at":"2015-08-18T19:02:45Z","closed_at":null,"body":"If any NHibernate 2nd level cache provider is activated, it gets activated for the whole AppDomain, never per tenant. Having `SysCache` as a feature is therefore a source of confusion. As a site admin, you will likely think you turn it on for a tenant, but really as soon as you turn it off for **any** tenant it's on for all of them.\r\n\r\nHaving it as a feature also makes it harder to manage, because to turn it off you have to:\r\n\r\n1. Disable it for **all** tenants on your site\r\n2. Restart the application pool\r\n\r\nI therefore propose that we remove the `SysCache` feature completely in `dev` and instead configure/activate any NHibernate 2nd level cache providers using `Host.config`.\r\n\r\nThe default implementation of `IDatabaseCacheConfiguration` does not enable any caching, which should still be the default configuration. If you want to enable the `SysCache` implementation you would do something like this:\r\n\r\n    <autofac defaultAssembly=\"Orchard.Framework\">\r\n        <components>\r\n            <component instance-scope=\"single-instance\" type=\"SysCache.Services.SysCacheDatabaseCacheConfiguration, SysCache\" service=\"Orchard.Data.IDatabaseCacheConfiguration\"></component>\r\n    </autofac>\r\n\r\nAnd to enable the `Orchard.Azure` implementation you would do:\r\n\r\n    <autofac defaultAssembly=\"Orchard.Framework\">\r\n        <components>\r\n            <component instance-scope=\"single-instance\" type=\"Orchard.Azure.Services.Caching.Databae.AzureCacheConfiguration, Orchard.Azure\" service=\"Orchard.Data.IDatabaseCacheConfiguration\"></component>\r\n    </autofac>\r\n\r\nWe could have both these configurations as commented-out examples in `Host.config`."},"comment":{"url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/comments/132319665","html_url":"https://github.com/OrchardCMS/Orchard/issues/5657#issuecomment-132319665","issue_url":"https://api.github.com/repos/OrchardCMS/Orchard/issues/5657","id":132319665,"user":{"login":"CSurieux","id":2103534,"avatar_url":"https://avatars.githubusercontent.com/u/2103534?v=3","gravatar_id":"","url":"https://api.github.com/users/CSurieux","html_url":"https://github.com/CSurieux","followers_url":"https://api.github.com/users/CSurieux/followers","following_url":"https://api.github.com/users/CSurieux/following{/other_user}","gists_url":"https://api.github.com/users/CSurieux/gists{/gist_id}","starred_url":"https://api.github.com/users/CSurieux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CSurieux/subscriptions","organizations_url":"https://api.github.com/users/CSurieux/orgs","repos_url":"https://api.github.com/users/CSurieux/repos","events_url":"https://api.github.com/users/CSurieux/events{/privacy}","received_events_url":"https://api.github.com/users/CSurieux/received_events","type":"User","site_admin":false},"created_at":"2015-08-18T19:02:45Z","updated_at":"2015-08-18T19:02:45Z","body":"You missed my point Paul, I just say that some features are nice to have for those not using the multitenant armada. But if those features are not friendly with MT it should be clearly mentioned to warn the admins."}}