Sha256: de9bdecab9fae20c5252bed6f2e3c8d9227e3564da1e7a28743703f14e7c2ef2
Contents?: true
Size: 913 Bytes
Versions: 12
Compression:
Stored size: 913 Bytes
Contents
# frozen_string_literal: true 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_are_different 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
12 entries across 12 versions & 1 rubygems