By injecting a ResourceRetriever into PurlVersion this removes the need to instantiate a ResourceRetriever for each version which causes duplicate fetches of the version manifest when determining if an object is versioned.
Logging confirms the duplicate fetch is removed.
Processing by PurlController#show as HTML
Parameters: {"id"=>"wp335yr5649", "version"=>"3"}
Fetching wp335yr5649 version_manifest at /Users/amcollie/github/sul-dlss/purl/spec/fixtures/document_cache/wp/335/yr/5649/wp335yr5649/versions/versions.json (0.1ms)
Fetching wp335yr5649 public_xml at /Users/amcollie/github/sul-dlss/purl/spec/fixtures/document_cache/wp/335/yr/5649/wp335yr5649/versions/public.3.xml (0.0ms)
Fixes #1107
By injecting a
ResourceRetriever
intoPurlVersion
this removes the need to instantiate aResourceRetriever
for each version which causes duplicate fetches of the version manifest when determining if an object is versioned.Logging confirms the duplicate fetch is removed.