Browse files

in response to #9:

* respond to the request even if the file has been cached.
  • Loading branch information...
1 parent cfb93a6 commit e11f9c4bd1acd8e642b4466ce62b59d3abef0009 @kellyredding committed Dec 9, 2011
Showing with 0 additions and 2 deletions.
  1. +0 −2 lib/rack/less/request.rb
@@ -90,13 +90,11 @@ def cached?
# Determine if the request is for a non-cached existing LESS CSS source file
# This will be called on every request so speed is an issue
# => first check if the request is a GET on a css resource in :hosted_at (fast)
- # => don't process if a file has already been cached
# => otherwise, check for less source files that match the request (slow)
def for_less?
get? && # GET on css resource in :hosted_at (fast, check first)
for_css? &&
hosted_at? &&
- !cached? && # resource not cached (little slower)
!source.files.empty? # there is source for the resource (slow, check last)

0 comments on commit e11f9c4

Please sign in to comment.