Backend session variables?

Seems like our router functions are executing twice on every page visit. This is a problem because the first one to execute claims a remote resource. Then the second one sees that resource as already claimed and denies access to it.

We could resolve this if the functions could share data with each other… but not with the same functions running in other sessions. Is there any way to store session-specific data on the backend?