Which design pattern is used to invalidate a cached page after the underlying data has changed?
Adapter
B. Decorator
C. Strategy Observer
D. Observer
查看答案
What technique allows fragment caching to prevent ActiveRecord from ever contacting the database even after an ActiveRecord query is made (such as Movie.all)?
A. Cache invalidation
B. Lazy evaluation
C. A content delivery network
D. Lambda calculus
You have just implemented several levels of caching in your web application. A user calls to tell you that when they visit the site, they see another user's name as the currently logged in user. Assuming that nobody else has used the user's computer, This problem could stem from a stale (select all that apply):
A. Browser cache
B. Page cache
C. Action cache
D. Query cache
Suppose Order belongs to Customer, and a view has @order.customer.name. Is this a Demeter violation?
A. Yes...but probably reasonable to just expose object graph in the view in this case
B. Yes...replace with Order#customer_name which delegates to Customer#name
C. Yes...you can make a case for either of the above
D. No...by using belongs_to we're already exposing info about the Customer anyway
The use of FakeWeb to stub external SOA requests in testing is an example of which design pattern?- 未答复
A. Null object
B. Proxy
C. Adapter
D. Facade