Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/gitlab/markdown_cache/redis/store.rb4
-rw-r--r--spec/lib/gitlab/markdown_cache/redis/extension_spec.rb4
-rw-r--r--spec/lib/gitlab/markdown_cache/redis/store_spec.rb4
-rw-r--r--spec/models/concerns/cache_markdown_field_spec.rb4
4 files changed, 2 insertions, 14 deletions
diff --git a/lib/gitlab/markdown_cache/redis/store.rb b/lib/gitlab/markdown_cache/redis/store.rb
index 2d4a89d9f1c..0f954404808 100644
--- a/lib/gitlab/markdown_cache/redis/store.rb
+++ b/lib/gitlab/markdown_cache/redis/store.rb
@@ -43,9 +43,9 @@ module Gitlab
end
def markdown_cache_key
- unless @subject.respond_to?(:id)
+ unless @subject.respond_to?(:cache_key)
raise Gitlab::MarkdownCache::UnsupportedClassError,
- "This class has no id to use for caching"
+ "This class has no cache_key to use for caching"
end
"markdown_cache:#{@subject.cache_key}"
diff --git a/spec/lib/gitlab/markdown_cache/redis/extension_spec.rb b/spec/lib/gitlab/markdown_cache/redis/extension_spec.rb
index 24cfb399cc3..b6a781de426 100644
--- a/spec/lib/gitlab/markdown_cache/redis/extension_spec.rb
+++ b/spec/lib/gitlab/markdown_cache/redis/extension_spec.rb
@@ -15,10 +15,6 @@ describe Gitlab::MarkdownCache::Redis::Extension, :clean_gitlab_redis_cache do
cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description
- def id
- "test-markdown-cache"
- end
-
def cache_key
"cache-key"
end
diff --git a/spec/lib/gitlab/markdown_cache/redis/store_spec.rb b/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
index e7701cf1306..95c68e7d491 100644
--- a/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
+++ b/spec/lib/gitlab/markdown_cache/redis/store_spec.rb
@@ -13,10 +13,6 @@ describe Gitlab::MarkdownCache::Redis::Store, :clean_gitlab_redis_cache do
attr_accessor :field_1, :field_2, :field_1_html, :field_2_html, :cached_markdown_version
- def id
- 'test-redisbacked-store'
- end
-
def cache_key
"cache-key"
end
diff --git a/spec/models/concerns/cache_markdown_field_spec.rb b/spec/models/concerns/cache_markdown_field_spec.rb
index 9e6b5d56805..0e5fb2b5153 100644
--- a/spec/models/concerns/cache_markdown_field_spec.rb
+++ b/spec/models/concerns/cache_markdown_field_spec.rb
@@ -27,10 +27,6 @@ describe CacheMarkdownField, :clean_gitlab_redis_cache do
cache_markdown_field :title, pipeline: :single_line
cache_markdown_field :description
- def id
- "test-markdown-cache"
- end
-
def cache_key
"cache-key"
end