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.