Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
de21320d
Commit
de21320d
authored
Jun 05, 2019
by
Patrick Bajao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove requirement for id for #markdown_cache_key
It's not needed anymore as we require `#cache_key` instead.
parent
56d52340
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
14 deletions
+2
-14
lib/gitlab/markdown_cache/redis/store.rb
lib/gitlab/markdown_cache/redis/store.rb
+2
-2
spec/lib/gitlab/markdown_cache/redis/extension_spec.rb
spec/lib/gitlab/markdown_cache/redis/extension_spec.rb
+0
-4
spec/lib/gitlab/markdown_cache/redis/store_spec.rb
spec/lib/gitlab/markdown_cache/redis/store_spec.rb
+0
-4
spec/models/concerns/cache_markdown_field_spec.rb
spec/models/concerns/cache_markdown_field_spec.rb
+0
-4
No files found.
lib/gitlab/markdown_cache/redis/store.rb
View file @
de21320d
...
...
@@ -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
}
"
...
...
spec/lib/gitlab/markdown_cache/redis/extension_spec.rb
View file @
de21320d
...
...
@@ -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
...
...
spec/lib/gitlab/markdown_cache/redis/store_spec.rb
View file @
de21320d
...
...
@@ -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
...
...
spec/models/concerns/cache_markdown_field_spec.rb
View file @
de21320d
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment