Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

This project is archived and is in readonly mode.

Added fragment_exist? method

#203

Added fragment_exist? method.

This is most useful when using file_store cause You reduce the IO operations. And it's better then doing:

read_fragment(path).nil?

To this work properly, I also added an exist? method in all cache stores.

Tests included.

ps: For some strange reason, git format-patch doesn't work properly here (patch is not created).

Reported by José Valim · May 15th, 2008 @ 12:04 PM

State: resolved
Milestone: none
Assigned to: Tobias Lütke Tobias Lütke
Importance: none

Activity

  1. Tobias Lütke
    Tobias Lütke

    Looks good, i'm inclined to apply the patch.

    Can you guys add me to the rails project?

    May 15th, 2008 @ 07:34 PM

  2. Pratik
    Pratik

    Few things.

    1. Could you please use git-format-patch ? It should be possible to get help in #git, #github or #rails-contrib if you're having troubles with that.

    2. Your diff is changing permission of files, which is not needed.

    Other than that, thanks for the patch!

    @Tobias Lütke : Invited you to the project.

    May 16th, 2008 @ 03:27 PM

  3. Pratik
    Pratik
    • Assigned user set to Tobias Lütke

    May 16th, 2008 @ 03:30 PM

  4. José Valim
    José Valim

    1. I think that it's a problem with cygwin (yep, I'm using Windows =/)

    2. What do You mean with changing permission of files?

    May 16th, 2008 @ 04:06 PM

  5. Pratik
    Pratik

    If you look at the generated diff files, you'll see things like :

    diff --git a/activesupport/lib/active_support/cache.rb b/activesupport/lib/active_support/cache.rb

    old mode 100644

    new mode 100755

    That's not needed.

    May 16th, 2008 @ 04:10 PM

  6. José Valim
    José Valim

    Ok, patch done in the right away!

    Would be nice if someone adds to the tutorial http://rails.lighthouseapp.com/p..., that you have to do a commit to the working branch before create the patch with format-patch.

    May 16th, 2008 @ 06:16 PM

  7. Repository
    Repository
    • State changed from new to resolved

    (from [99860b72aebe0348f41e82d4710343498d89a84b]) Add fragment_exist? and exist? methods to cache stores. [#203 state:resolved]

    Signed-off-by: Pratik Naik

    http://github.com/rails/rails/co...

    May 19th, 2008 @ 10:47 AM