Singleton in extension for cache not working

Hi guys

I have created a singleton in my extension in other Cache queries.

What I realize is that when I call the extension from my Outsystems application, it creates a new instance of the class. Can anyone help me with this.

Is there another way to use Cache in extension. 

Rank: #369

As I understand this correct, you need a way to cache the result from your extension?

In that case, you can wrap it in a User Action / Server Action and set the cache property of this action to the length that you prefer. Inside this action you call your extension's action. Whenever the system calls your user action with parameter values that have been used before, it will return the cached result and not execute your extension's action again.

Rank: #32521

Hi thanks for your reply. But what I want is to cache the result from a query that is executed inside of a method in extension. This method can only be called inside the extension.