←back to thread

475 points danielstocks | 4 comments | | HN request time: 0.499s | source
Show context
AtNightWeCode ◴[] No.27301565[source]
Will be interesting to see what the problem is here. From what I have seen in real life my top guesses are. Some dependency on static variables in code. Reversed proxy with incorrect cache rules that ignores headers or some parameter.
replies(1): >>27301584 #
1. corroclaro ◴[] No.27301584[source]
How do you envision the static variables thing? I've seen the cache thing myself in real life but not the other.
replies(3): >>27301613 #>>27301704 #>>27302207 #
2. adflux ◴[] No.27301613[source]
Store user in static variable during processing data, then forget to clear the variable when you are done, so for the next request it still has access to the old data?
3. AtNightWeCode ◴[] No.27301704[source]
In C# for instance. If you mark a field static it is the same for all instances of a class (if you don't mark the code as thread static). So if you have static User field that changes on logon it will change for everyone. I have seen this but typically more complicated versions of it.
4. chopin ◴[] No.27302207[source]
These can act like a cache across all instances. For exactly this reason I use them only as final (constant) variables and very, very rarely mutable.