Avoiding output caching, mod_ruby/Apache?

I got that annoying thing: all pages that are parsed by Ruby - they
cache somehow, so that I have to restart Apache in order to see any
changes in browser. It’s not FastCGI, because I turned it of, so that
could be mod_ruby, I guess. But I have no idea of how to configure it
not to cache the output. Does anyone have a clue?

Roman Snitko wrote:

I got that annoying thing: all pages that are parsed by Ruby - they
cache somehow, so that I have to restart Apache in order to see any
changes in browser. It’s not FastCGI, because I turned it of, so that
could be mod_ruby, I guess. But I have no idea of how to configure it
not to cache the output. Does anyone have a clue?

What do you mean by “pages that are parsed by Ruby”? Do you mean code in
.rb files or libraries, or do you mean .rhtml files which use erb,
or…?
If it’s code or libraries, remember that mod_ruby is just using one
instance of a Ruby interpreter. So, once a file is loaded, that’s the
version it uses, just like if you were using it in IRB or a running
program. It isn’t going to reload your code every time you make a
change. Restarting Apache will force it to start off with a fresh
interpreter.

Hope that helps clear it up a little bit.

-Justin

Yeah, thanks, I think I’m getting it.

The story is, I have an .rhtml file, that requires another .rb file.
I read, of course, that ruby ‘requires’ file only once, but i thought
this statement takes action only during current let’s call it “page
loading”, not during the whole session.

Will replacing ‘require’ with ‘load’ fix this?

Roman Snitko wrote:

Yeah, thanks, I think I’m getting it.

The story is, I have an .rhtml file, that requires another .rb file.
I read, of course, that ruby ‘requires’ file only once, but i thought
this statement takes action only during current let’s call it “page
loading”, not during the whole session.

Will replacing ‘require’ with ‘load’ fix this?

I’m pretty sure it will. Note that you will probably have to add “.rb”
to the end of the file, e.g., load “myfile.rb” instead of require
“myfile”

-Justin