O'Reilly logo

IBM WebSphere eXtreme Scale 6 by Anthony Chaves

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Caching more than ORM

Though we cache a lot of objects that map to database tables through an ORM framework, we are not limited to ORM'd objects. The NameToId map is an example of this. It does not have a corresponding table in a database. Instead, it is an intermediate map between users and their data. The user data doesn't necessarily need to be the user object and the bookmarks that go along with it. We can cache HTML fragments instead.

Which HTML fragments? A user looks at their bookmarks in a browser. If a user hasn't changed their bookmarks since the last cache hit, then we store the HTML view of those bookmarks in addition to the data objects. This moves the cache one logical layer closer to the user. Instead of assembling HTML in the controller, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required