0

There is a very complex calculation and system health verifications that returns a numeric variable.

This variable will be displayed in every page, But I don't want to make this verification and calculation every navigation. This value should be visible to EVERY session for all users, not just one session. the most simple solution could be a global variable that would persist and be available for all sessions.

Filesytem or database are not an option.

Is that possible in PHP?

5
  • Cache the query result then. Commented Mar 3, 2016 at 14:08
  • the question is exactaly how to cache the query. Commented Mar 3, 2016 at 14:11
  • Then it's duplicated stackoverflow.com/questions/15746138/… Commented Mar 3, 2016 at 14:15
  • it is not an SQL query, i edited the question to avoid misunderstanding. Commented Mar 3, 2016 at 14:20
  • Well it's the same, cache the result the same way you would cache a query. Commented Mar 3, 2016 at 14:29

1 Answer 1

1

shared memory could be a solution.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.