summaryrefslogtreecommitdiff
path: root/spec/lib/banzai/renderer_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@13-2-stable-eeGitLab Bot2020-07-201-1/+1
|
* Add latest changes from gitlab-org/gitlab@13-0-stable-eeGitLab Bot2020-05-201-2/+55
|
* Add frozen_string_literal to spec/lib (part 1)Thong Kuah2019-07-261-0/+2
| | | | | Using the sed script from https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
* Banzai - avoid redis if attr is in DB cachebanzai-avoid-redis-if-db-cacheMario de la Ossa2019-07-101-0/+18
| | | | | | | 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.
* Use Redis for CacheMarkDownField on non AR modelsPatrick Bajao2019-06-051-3/+11
| | | | | | | | | | | | | | | | | | 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`.
* Resolve "DashboardController#activity.json is slow due to SQL"Francisco Javier López2017-11-061-1/+1
|
* Create idea of read-only databasetc-geo-read-only-ideaToon Claes2017-10-061-1/+8
| | | | | | | | | | | | In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo secondary node). But in GitLab CE it also might be useful to have the "read-only" idea around. So port it back to GitLab CE. Also having the principle of read-only in GitLab CE would hopefully lead to less errors introduced, doing write operations when there aren't allowed for read-only calls. Closes gitlab-org/gitlab-ce#37534.
* Adds cacheless render to Banzai object render34509-improves-markdown-rendering-performance-for-commits-listTiago Botelho2017-09-061-11/+25
|
* Auto-correct `RSpec/DescribedClass` violationsrs-described_class-cop-2Robert Speicher2017-05-011-1/+1
|
* Start versioning cached markdown fieldsNick Thomas2017-04-211-53/+16
|
* Add markdown cache columns to the database, but don't use them yetNick Thomas2016-10-071-0/+74
This commit adds a number of _html columns and, with the exception of Note, starts updating them whenever the content of their partner fields changes. Note has a collision with the note_html attr_accessor; that will be fixed later A background worker for clearing these cache columns is also introduced - use `rake cache:clear` to set it off. You can clear the database or Redis caches separately by running `rake cache:clear:db` or `rake cache:clear:redis`, respectively.