Close and Go BackBack to Viget

About

Technologies change in our industry at lightning-fast paces, sometimes at the expense of Best Practices. We want to change that trend to one of more stability and longevity. It can only benefit everyone, right?

Right. So, in this blog – facilitated by the developers at Falls Church, VA-based web consulting firm Viget Labs – we discuss the latest standards, review some of the coolest technologies and applications, review books, talk about great conferences and meetups, and generally dig into the nitty-gritty meat of what’s happening in today’s web industry.

A Development Community for Viget Labs and Beyond

Every team member here at Viget Labs strives to be an innovator. We members of the development team are no different - that's why we're constantly engaging in community discussions and exploring the unknown that is the next generation of open-source web applications.

Viget Is Hiring!

Viget has job openings for Ruby Developers, Interns, and Front-End Developers. Learn More »

Recent Comments

In my quick testing of this it does still work if you chain items after the cache name:

Category.top_level.other_scope

But important to note is this will still make a call to the database, it will not take advantage of the cache. Of course the actual scope, in this case find_top_level is unchanged and so you can still do any chaining with that, which also of course won’t use the cache.

As a final note though if you’re needing to do much chaining, caching in this way may not be best for your particular situation. The idea of the cache is if you need to retrieve the exact same result set over and over again, and it rarely changes you shouldn’t have to hit the database.