I had an error where after a redirect was added it only worked occasionally. It appeared to be quite random.
The error was caused by storing the results of FlowMeter.all in a class variable (which is presumably done for speed). When you have multiple instances running (which is typical in a production environment) only the instance where the redirect was created had the new redirect while the other instances would return a 404. The other instances would return the redirection only after restarting them (as they reload from the database).
I've solved this in my system by storing FlowMeter.all in memcached (instead of @@all) but it's not a generic solution.
I had an error where after a redirect was added it only worked occasionally. It appeared to be quite random.
The error was caused by storing the results of FlowMeter.all in a class variable (which is presumably done for speed). When you have multiple instances running (which is typical in a production environment) only the instance where the redirect was created had the new redirect while the other instances would return a 404. The other instances would return the redirection only after restarting them (as they reload from the database).
I've solved this in my system by storing FlowMeter.all in memcached (instead of @@all) but it's not a generic solution.