Sha256: 524b568a07163f267c341c2722991897b8e84bd1be68d381167e673e04f3c88f
Contents?: true
Size: 868 Bytes
Versions: 82
Compression:
Stored size: 868 Bytes
Contents
class RequestCycleCacheController < ApplicationController def simple User.find(1) # first request user = User.find(1) # second request that should be serverd from request cycle cache render json: user.to_json end def no_caching_interceptor User.options(interceptors: []).find(1) # first request user = User.options(interceptors: []).find(1) # second request render json: user.to_json end def parallel User.find(1, 2) # first request users = User.find(1, 2) # second request that should be serverd from request cycle cache render json: users.to_json end def headers User.find(1) # first request user = User.options(headers: { 'Authentication' => 'Bearer 123' }).find(1) # second request that should NOT be serverd from request cycle cache as the headers are different render json: user.to_json end end
Version data entries
82 entries across 82 versions & 1 rubygems