This documentation is for the legacy Izenda 6 product. Documentation for the new Izenda 7 product can be found at https://www.izenda.com/docs/
AdHocSettings.PerUserCaching determines whether or not an individual instance of the DatabaseSchema object is cached in session for each user. This setting is most commonly used in environments with a load balancer, or web farms, as the session is persistent across all servers (using user affinity). This is also useful if your users have different sets of visible data sources.
Since Izenda 6.8.0.7, Izenda checks the Database Schema cache available to it against the VisibleDataSources array set in InitializeReporting() to make sure it has every data sources it needs, and will update the cache accordingly, if necessary. This eliminates the need for AdHocSettings.PerUserCaching = true, which tells Izenda to store a separate copy of the database schema cache for each user in session (ideal for load balanced environments to limit database calls).
Default Value: False
//main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig public class CustomAdHocConfig : Izenda.AdHoc.DatabaseAdHocConfig { // Configure settings // Add custom settings after setting the license key and connection string by overriding the ConfigureSettings() method public static void InitializeReporting() { //Check to see if we've already initialized. if (HttpContext.Current.Session == null || HttpContext.Current.Session["ReportingInitialized"] != null) return; AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE"; AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE"; Izenda.AdHoc.AdHocSettings.AdHocConfig = new CustomAdHocConfig(); AdHocSettings.PerUserCaching = true; //The relevant setting HttpContext.Current.Session["ReportingInitialized"] = true; } }
'main class: inherits DatabaseAdHocConfig or FileSystemAdHocConfig Public Class CustomAdHocConfig Inherits Izenda.AdHoc.DatabaseAdHocConfig Shared Sub InitializeReporting() 'Check to see if we've already initialized If HttpContext.Current.Session Is Nothing OrElse HttpContext.Current.Session("ReportingInitialized") IsNot Nothing Then Return 'Initialize System AdHocSettings.LicenseKey = "INSERT_LICENSE_KEY_HERE" AdHocSettings.SqlServerConnectionString = "INSERT_CONNECTION_STRING_HERE" Izenda.AdHoc.AdHocSettings.AdHocConfig = New CustomAdHocConfig() AdHocSettings.PerUserCaching = True 'The relevant setting HttpContext.Current.Session("ReportingInitialized") = True End Sub End Class
Last edited by Shahein Moussavi, 2016-08-30 18:01:59