0

Hi, I'll explain my problem so you could picture it clearly.

I do a complex query to fetch some information from the database and the problem is that the query takes some time. Fortunately, the result of the query doesn't change often, so I thought of a solution to store the data in a session variable to avoid doing the query repetitively.

The problem is that sometimes the content of the db can indeed be changed by another user. This would leave the result held by the other users unaffected. But I want them to know so that they can update their resources.

Now, I was thinking of a flag variable that both/multiple users can refer to that will tell them to update their resources. In other words, a way to communicate the change. Now, sessions cannot be used in this case since it only affects each user. Well, as you may have already thought, this could be stored in the database or a file. Anyway, it's a solution but I was thinking if there is another way? Like a system or site wide variable that can handle this? I mean can I store variables in the web server (apache in my case)?

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by OriginalCopy
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.