For future ref, see:
http://docs.jboss.org/hibernate/core/3.5/reference/en/html_single/#performance-querycache-enable
Btw, if you're using Hibernate 3.5 or higher, I'd recommend using Infinispan as 2LC instead. It's much faster, easier to configure :)
http://community.jboss.org/docs/DOC-14105