Class: Api::V5::BaseController

Inherits:
ActionController::API
  • Object
show all
Includes:
Concerns::RescueErrors, ElasticAPM::SpanHelpers, ElasticApmContext, LogrageCustomLogger, Recaptcha::Adapters::ControllerMethods, ResponseCacheConcern
Defined in:
app/controllers/api/v5/base_controller.rb

Overview

Base controller for V5 API

Constant Summary collapse

INTERNAL_SERVER_ERROR_MESSAGE =
'Sorry, something went wrong'
ResponseSchema =

Response schema of this API

ImmutableStruct.new(:data, :message, :success)
CACHE_NAMESPACE =
'api_v5_cache'

Instance Method Summary collapse

Methods included from LogrageCustomLogger

#append_info_to_payload

Methods included from ResponseCacheConcern

#my_response_cache

Instance Method Details

#identity_cache_memoization(&block) ⇒ Object



19
20
21
# File 'app/controllers/api/v5/base_controller.rb', line 19

def identity_cache_memoization(&block)
  IdentityCache.cache.with_memoization(&block)
end