From 2ab54573d10ca59351100ab8416178be2223fc91 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 27 Feb 2019 16:49:42 +0200 Subject: Added support for caching on machine studio. --- .../Tango.MachineStudio.Common/MachineStudioSettings.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs index f7c05c1a8..e5fe63d87 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; +using Tango.BL; using Tango.Logging; using Tango.PMR.Printing; using Tango.Settings; @@ -107,6 +108,16 @@ namespace Tango.MachineStudio.Common /// public bool ByPassEnvironmentVersionCheck { get; set; } + /// + /// Gets or sets a value indicating whether to enable database entity caching. + /// + public ObservablesContextInMemoryCachingMode CachingMode { get; set; } + + /// + /// Gets or sets the maximum cache time for a single entity (when CachingMode is set Absolute or Relative). + /// + public TimeSpan MaximumCacheTime { get; set; } + /// /// Gets the machine service address. /// @@ -136,6 +147,8 @@ namespace Tango.MachineStudio.Common Environment = WorkingEnvironment.Remote; DeploymentSlot = DeploymentSlot.DEV; JobUploadStrategy = JobUploadStrategy.Default; + MaximumCacheTime = TimeSpan.FromMinutes(5); + CachingMode = ObservablesContextInMemoryCachingMode.None; } } } -- cgit v1.3.1