Rails log message: cache: [POST / action] is invalid, passes

I run rails 3 with jruby and trinidad and I continue to see these log messages:

INFO http-bio-3001-exec-15 jruby.rack - cache: [POST /something] invalidate, pass 

What exactly does this mean? In addition, the code in the controller also does not run. Is this a problem with caching?

+8
ruby-on-rails
source share
2 answers

Whenever Rails receives a POST request, it performs some security checks to make sure the request is "valid." Verifications are performed by parsing the CSRF authentication tokens that MUST be presented with the form in the POST request.

If you cannot edit the form that makes the request in your rails application, you can skip the validation on the controller according to the principle:

 class Foo < ApplicationController skip_before_filter :verify_authenticity_token 

or you can also do this for a specific method in the controller:

 class Foo < ApplicationController skip_before_filter :verify_authenticity_token, :only => [:create] 

You can read about it here.

+3
source share

cache: [POST / something] is invalid, passes

This says that a POST request was issued, and an invalid pass means that this type of cache cannot be used. You will get invalid, skip any change request (POST, PUT, DELETE, etc.)

+2
source share

All Articles