I hereby claim:
- I am debajit on github.
- I am debajit (https://keybase.io/debajit) on keybase.
- I have a public key ASAUVr0SOg_-qoSNlPSZ0yzgOtWHVkVuRc331-IlryTxLwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class Updater | |
| METADATA_FILE = self.class.file_path | |
| def initialize | |
| METADATA_FILE | |
| end | |
| def self.file_path | |
| 'some file path' | |
| end |
| def show | |
| if stale?(@model, public: true) | |
| respond_to do |format| | |
| format.json do | |
| full_structure_json = Rails.cache.fetch("#{@model.cache_key}") do | |
| MyCustomSerializer.new(@model).to_json | |
| end | |
| render json: full_structure_json | |
| end |