Skip to content

Commit

Permalink
Add memo-ization of persister.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Sep 14, 2021
1 parent d81d2ae commit 43042a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/valkyrie/persistence/solr/metadata_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize(connection:, resource_indexer: NullIndexer, write_only: false)

# @return [Valkyrie::Persistence::Solr::Persister] The solr persister.
def persister
Valkyrie::Persistence::Solr::Persister.new(adapter: self)
@persister ||= Valkyrie::Persistence::Solr::Persister.new(adapter: self)
end

def write_only?
Expand Down

0 comments on commit 43042a0

Please sign in to comment.