Class: ActiveSupport::Cache::GcloudDatastore

Inherits:
Store
  • Object
show all
Defined in:
lib/active_support/cache/gcloud_datastore.rb

Instance Method Summary collapse

Constructor Details

#initialize(*options) ⇒ GcloudDatastore

attr_reader :project_id



12
13
14
15
16
17
18
19
20
# File 'lib/active_support/cache/gcloud_datastore.rb', line 12

def initialize(*options)
  super(options)
  @options = options.extract_options!
  @project_id = @options[:project_id] || Rails.application.config.database_configuration[Rails.env]["dataset_id"]
  @credential_file_json = @options[:credential_file_json]
  @serialize_content_zip_enabled = (@options[:content_zip].blank? || @options[:content_zip]) ? true : false
  @serialize_content_base64_enabled = (@options[:content_base64].blank? || @options[:content_base64]) ? true : false
  @datastore_kind_name = @options[:kind_name] || "cache_#{ Rails.env }"
end