README.md in riiif-2.0.0.beta2 vs README.md in riiif-2.0.0
- old
+ new
@@ -61,11 +61,19 @@
```
This file resolver caches the network files, so you will want to clear out the old files or the cache will expand until you run out of disk space.
Using a script like this would be a good idea: https://github.com/pulibrary/loris/blob/607567b921404a15a2111fbd7123604f4fdec087/bin/loris-cache_clean.sh
By default the cache is located in `tmp/network_files`. You can set the cache path like this: `Riiif::Image.file_resolver.cache_path = '/var/cache'`
+### Kakadu (for faster jp2 decoding)
+To configure Riiif to use Kakadu set:
+```ruby
+Riiif::Engine.config.kakadu_enabled = true
+```
+
+See [benchmark](docs/benchmark.md) for details
+
### GraphicsMagick
To use [GraphicsMagick](http://www.graphicsmagick.org/) instead of ImageMagick
Riiif::ImagemagickCommandFactory.external_command = "gm convert"
@@ -165,11 +173,18 @@
# Capture everything before the first slash
fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
resp = ActiveFedora::SolrService.get("id:#{fs_id}")
doc = resp['response']['docs'].first
raise "Unable to find solr document with id:#{fs_id}" unless doc
- { height: doc['height_is'], width: doc['width_is'] }
+
+ # You’ll want default values if you make thumbnails of PDFs or other
+ # file types that `identify` won’t return dimensions for
+ {
+ height: doc["height_is"] || 100,
+ width: doc["width_is"] || 100,
+ format: doc["mime_type_ssi"],
+ }
end
def logger
Rails.logger
end
@@ -177,10 +192,10 @@
# Note that this is translated to an `expires` argument to the
# ActiveSupport::Cache::Store in use, by default the host application's
# Rails.cache. Some cache stores may not automatically purge expired content,
# such as the default FileStore.
# http://guides.rubyonrails.org/caching_with_rails.html#cache-stores
-Riiif::Engine.config.cache_duration_in_days = 30
+Riiif::Engine.config.cache_duration = 30.days
```
#### Special note for Passenger and Apache users
If you are running riiif in Passenger under Apache, you must set the following in your virtual host definition:
```