I'm trying to read the value of a custom system setting in creatio from the client-side, but I noticed that even if my setting has the flag "Cached" it results undefined when I try to get the value using this code:
var test = Terrasoft.SysSettings.cachedSettings.UsrSysSettingTest;
while when I use the asynchronous way it works fine.
I discovered that the problem with the cached setting was the type of it. To fix the issue I simply had to change the type from Text (500) to Text (250), I tried to do the same in other environments and I had the same result.
Does this issue occur in another browser? In my case cached system setting was fetched properly after relogin and the issue is not in the rights for the setting since you can fetch it asynchronously.
I discovered that the problem with the cached setting was the type of it. To fix the issue I simply had to change the type from Text (500) to Text (250), I tried to do the same in other environments and I had the same result.
We have a need to cache some data at the user session level on the server and have identified iCacheStore as the repository choice for this. The following link (https://academy.creatio.com/documents/technic-sdk/7-15/repositories) only gives examples to store strings as values inside the cache object dictionary.
Could we get a code snippet for how to store C# objects as values inside the cache object dictionary? Thanks in Advance!!
In order to store an object in Application cache you should serialize the object to string and save the string. Please find more information about serialization in the article by the link below:
I have a requirement to fetch data from an external API. The call is pretty costly in terms of performance and the data size is pretty huge. The good thing is the data is relatively static and doesn't change too often. Also, the data is transient in nature. It needs to be used for some intermediate processing and need not be persisted in the BPM'Online database. Ideally, I would like to store this data in the Redis Cache and set an expiry of 3 hours.
Theoretically, it seems possible to access the Redis Cache and get/set the values from/into the cache through the Source Code Schema. I wanted to confirm if there are any recommended ways of doing it? Are there any C# wrappers/classes that are already built in BPM'Online that we can use to get/set/invalidate cache?
There is no possibility to write directly to the Redis cache from the configuration. However, you can write to the Application level cache, which is stored to the Redis. Please see this article to find more info on Application cache:
In your earlier comment, you give an example of how to store a String in the dictionary. Could you share a working code snippet of how we can cache C# objects inside it?
In order to store an object in Application cache you should serialize the object to string and save the string. Please find more information about serialization in the article by the link below: