Class: Upload::CurrentPaths
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- Upload::CurrentPaths
- Defined in:
- app/models/upload.rb
Overview
Request-scoped cache mapping upload IDs to local temp file paths.
Automatically reset at the start of each web request / Sidekiq job.
Allows freshly loaded instances (e.g. via includes) to reuse files
already on disk, avoiding redundant S3 round-trips.
Delegated Instance Attributes collapse
-
#[] ⇒ Object
Alias for Registry#[].
-
#[]= ⇒ Object
Alias for Registry#[]=.
-
#delete ⇒ Object
Alias for Registry#delete.
Instance Method Summary collapse
Instance Method Details
#[] ⇒ Object
Alias for Registry#[]
116 |
# File 'app/models/upload.rb', line 116 delegate :[], to: :registry |
#[]= ⇒ Object
Alias for Registry#[]=
118 |
# File 'app/models/upload.rb', line 118 delegate :[]=, to: :registry |
#delete ⇒ Object
Alias for Registry#delete
120 |
# File 'app/models/upload.rb', line 120 delegate :delete, to: :registry |
#registry ⇒ Object
112 113 114 |
# File 'app/models/upload.rb', line 112 def registry self.store ||= {} end |