Module: Seabright
- Defined in:
- lib/redis_object/ext/view_caching.rb,
lib/redis_object.rb,
lib/redis_object/tpl.rb,
lib/redis_object/base.rb,
lib/redis_object/keys.rb,
lib/redis_object/types.rb,
lib/redis_object/logger.rb,
lib/redis_object/indices.rb,
lib/redis_object/storage.rb,
lib/redis_object/version.rb,
lib/redis_object/defaults.rb,
lib/redis_object/matchers.rb,
lib/redis_object/ext/views.rb,
lib/redis_object/collection.rb,
lib/redis_object/timestamps.rb,
lib/redis_object/types/date.rb,
lib/redis_object/types/json.rb,
lib/redis_object/validation.rb,
lib/redis_object/ext/cleaner.rb,
lib/redis_object/ext/filters.rb,
lib/redis_object/storage/aws.rb,
lib/redis_object/types/array.rb,
lib/redis_object/types/float.rb,
lib/redis_object/ext/triggers.rb,
lib/redis_object/types/number.rb,
lib/redis_object/ext/benchmark.rb,
lib/redis_object/ext/shardable.rb,
lib/redis_object/storage/mysql.rb,
lib/redis_object/storage/redis.rb,
lib/redis_object/types/boolean.rb,
lib/redis_object/external_index.rb,
lib/redis_object/storage/adapter.rb,
lib/redis_object/ext/sanitization.rb,
lib/redis_object/ext/script_cache.rb,
lib/redis_object/experimental/dumping.rb,
lib/redis_object/inheritance_tracking.rb,
lib/redis_object/experimental/history_untested.rb
Overview
View Caching
Cache a named view:
cache_named_view :admin_view
Invalidate all cached views when the I receive notification that something I reference or have been referenced by has changed:
invalidate_caches_from_upstream_updates!
Notify some objects that reference me when I am updated: (objects of these classes)
invalidate_upstream Property, Application, PaymentRequest, PaymentResponse
Notify some objects in my collections when I am updated: (objects in these collections)
invalidate_downstream Property, Application, PaymentRequest, PaymentResponse
You can also set up hooks for when this object is updated by certain types of objects by defining the following:
def invalidated_by(obj,chain)
invalidate_cached_view :blah
end
def invalidated_by_user(obj,chain)
invalidate_cached_view :users
end
Defined Under Namespace
Modules: Benchmark, CachedScripts, Collections, DefaultValues, Dumping, Filters, History, Indices, InheritanceTracking, Keys, Matchers, ObjectBase, RedisObjectCleaner, Sanitization, Shardable, Storage, Template, Timestamps, Triggers, Types, Validation, ViewCaching, Views Classes: Collection, ExternalIndex, Log, RedisObject