A question about the caching system

In the example from the documentation, I see information about caching, but I can’t figure it out - does this only apply to data called through RemoteConfigSettings.AssignSettingsGetAsync (and with Remote Config in general)?

If in a class similar to QuestService, I just create a variable with a different kind of data (for example, some integer to store the last ID this player voted recently for to compare - and this is not “Remote Сonfig” data), is there a chance that the value of this variable will be preserved upon the next function call from the client side? If yes, how long does this work? Thank you.

Hey!

If you will notice Quest system here in the QuestService, the quest items that come from Remote Config are stored in a local variable in Cloud Code for 5 minutes.

This only applies to Cloud Code C#, but if you choose to implement such caching like you mentioned: the value of the integer will stay there in Cloud Code for 15 minutes if there are no requests to your endpoints. However, if the traffic is steady and Cloud Code does not scale down, this cache could stay there more or less indefinitely.

1 Like