Commit Graph

4 Commits

Author SHA1 Message Date
Rémy Coutable f349f2a68c
Stop relying on migrations in the CacheableAttributes cache key and cache attributes for 1 minute instead
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-07-05 12:34:15 +02:00
Rémy Coutable 4eda09e3fb
Use RequestStore in CacheableAttributes.cached for greater performance
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-01 14:01:27 +02:00
Rémy Coutable a886532cc0
Revert to caching the AR object in CacheableAttributes
Caching the attributes as JSON and manually instantiating the record
ended-up very complex since the edge-cases such as upload fields,
serialized fields, and fields with custom accessors had to be handled.

To ensure 3 points out of 4 are checked from https://gitlab.com/gitlab-org/gitlab-ce/issues/45175
we now include the Rails version in the cache key.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-01 13:58:42 +02:00
Rémy Coutable 02f17a0988
Introduce a new CacheableAttributes concern
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-23 16:14:43 +02:00