Bot releases are visible (Hide)
Published by github-actions[bot] 7 months ago
Read the PR for more detail, but in short, start using stale?
in your controllers, as etag
and updated_at
, cache_key
, and cache_key_with_version
methods have been added to the resource.
class EmployeesController < ApplicationController
def index
@employees = Employees.all(params)
respond_with @employees if stale?(@employees)
end
end
Also you can now cache the rendering of a graphiti resource.
Graphiti.configure do |c|
c.cache_rendering = Rails.env.production?
# c.debug = true
# with debug enabled extra information about caching will be output
end
Graphiti.cache = ::Rails.cache # or whatever cache you want to use that conforms to the same typical cache interface with .read, .write. fetch, etc.
class EmployeesController < ApplicationResource
cache_resource, expires_in: 1.week
end
With the above the actual json-rendering will be cached, often improving response time dramatically. (All render cache keys are namespaced and start with graphiti:render/
, in case you're digging in your cache and wanting to see what's what)
Published by jkeen 7 months ago
Full Changelog: https://github.com/graphiti-api/graphiti/compare/v1.3.9...v1.4.0
Published by richmolj over 2 years ago
Main highlight is supporting more rubies, but full changelog update is pending
Published by richmolj over 3 years ago
Fix for custom adapters not supporting offset-based pagination
Published by richmolj over 3 years ago
Published by richmolj over 3 years ago
Published by richmolj over 3 years ago
Published by richmolj over 3 years ago
Published by richmolj over 3 years ago
Published by richmolj over 3 years ago