Cache clearing in Revision did not include wiki_reference_cache, which caused new pages to be created as orphans
This commit is contained in:
parent
c0605f0b78
commit
b1e92e3719
3 changed files with 24 additions and 10 deletions
|
@ -54,12 +54,12 @@ class Revision
|
|||
|
||||
# Returns an array of all the WikiWords present in the content of this revision.
|
||||
def wiki_words
|
||||
unless @wiki_words_cache
|
||||
unless @wiki_words_cache
|
||||
wiki_chunks = display_content.find_chunks(WikiChunk::WikiLink)
|
||||
@wiki_words_cache = wiki_chunks.map { |c| ( c.escaped? ? nil : c.page_name ) }.compact.uniq
|
||||
end
|
||||
@wiki_words_cache
|
||||
end
|
||||
end
|
||||
|
||||
# Returns an array of all the WikiWords present in the content of this revision.
|
||||
# that already exists as a page in the web.
|
||||
|
@ -88,8 +88,8 @@ class Revision
|
|||
end
|
||||
|
||||
def clear_display_cache
|
||||
@wiki_references_cache = @published_cache = @display_cache = nil
|
||||
@wiki_includes_cache = nil
|
||||
@wiki_words_cache = @published_cache = @display_cache = @wiki_includes_cache =
|
||||
@wiki_references_cache = nil
|
||||
end
|
||||
|
||||
def display_published
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue