2019-06-05 00:59:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module MarkdownCache
|
2021-08-03 11:10:03 -04:00
|
|
|
# Increment this number to invalidate cached HTML from Markdown documents.
|
|
|
|
# Even when reverting an MR, we should increment this because we only
|
|
|
|
# persist the cache when the new version is higher.
|
|
|
|
#
|
2021-05-12 08:10:24 -04:00
|
|
|
# Changing this value puts strain on the database, as every row with
|
2021-08-03 11:10:03 -04:00
|
|
|
# cached markdown needs to be updated. As a result, avoid changing
|
|
|
|
# this if the change to the renderer output is a new feature or a
|
|
|
|
# minor bug fix.
|
2021-05-12 08:10:24 -04:00
|
|
|
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/330313
|
2022-05-02 20:08:25 -04:00
|
|
|
CACHE_COMMONMARK_VERSION = 30
|
|
|
|
CACHE_COMMONMARK_VERSION_START = 10
|
2019-06-05 00:59:48 -04:00
|
|
|
|
|
|
|
BaseError = Class.new(StandardError)
|
|
|
|
UnsupportedClassError = Class.new(BaseError)
|
|
|
|
end
|
|
|
|
end
|