grape

https://github.com/intridea/grape

Ruby

An opinionated framework for creating REST-like APIs in Ruby.

FasterCacheKeys#cache_key

A faster version of Rails' "cache_key" method.

Rails' default "cache_key" method uses all kind of complex logic to figure
out the cache key. In many cases this complexity and overhead may not be
needed.

This method does not do any timestamp parsing as this process is quite
expensive and not needed when generating cache keys. This method also relies
on the table name instead of the cache namespace name as the latter uses
complex logic to generate the exact same value (as when using the table
name) in 99% of the cases.

Source | Google | Stack overflow

Edit

git clone [email protected]:intridea/grape.git

cd grape

open

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-FasterCacheKeys-cache_key-for-pr


# Commit to git

git add git commit -m "better docs for FasterCacheKeys#cache_key"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-FasterCacheKeys-cache_key-for-pr

hub pull-request


# Celebrate!