summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/markdown_cache
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43GitLab Bot2021-04-203-16/+17
|
* Add latest changes from gitlab-org/gitlab@13-3-stable-eeGitLab Bot2020-08-201-0/+1
|
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-204-6/+49
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-12-121-0/+1
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-191-2/+2
|
* Banzai - avoid redis if attr is in DB cachebanzai-avoid-redis-if-db-cacheMario de la Ossa2019-07-101-3/+4
| | | | | | | When cache_collection_render runs we end up reading and writing things to redis even if we already have the rendered field cached in the DB. This commit avoids using redis at all whenever we have the field already rendered in the DB cache.
* Remove requirement for id for #markdown_cache_keyPatrick Bajao2019-06-052-8/+0
| | | | It's not needed anymore as we require `#cache_key` instead.
* Use #cache_key of subject for generated redis keyPatrick Bajao2019-06-053-27/+37
| | | | | This commit also includes some changes in specs to use `Class.new` approach.
* Use Redis for CacheMarkDownField on non AR modelsPatrick Bajao2019-06-054-0/+336
This allows using `CacheMarkdownField` for models that are not backed by ActiveRecord. When the including class inherits `ActiveRecord::Base` we include `Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the markdown fields to be rendered and the generated HTML stored in a `<field>_html` attribute on the record. We also store the version used for generating the markdown. All other classes that include this model will include the `Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html` attributes to that model and will generate the html in them. The generated HTML will be cached in redis under the key `markdown_cache:<class>:<id>`. The class this included in must therefore respond to `id`.