Reputation: 3
Is it a solution to use Varnish to serve up dynamic (read-only) pages that has adsense on them? Or should I use Memcached to cache the database queries instead?
Upvotes: 0
Views: 1217
Reputation: 5559
The static adsense javascript will do its 'magic' at the client, so you can perfectly cache these pages server side... Both memcached and varnish will work for this. Varnish has the advantage of being a separate layer; you don't have to change any webserver code for it to work, but you can only cache on the HTTP layer (e.g. HTML pages). With memcached, you can cache many different things and on a more fine-grained level.
Upvotes: 0
Reputation: 2538
Yes. The adsense code is static javascript, which gets the latest version of data by itself.
Upvotes: 4