Forum: Ruby on Rails Is there anyway to make Rails NOT cache?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Phillip Novess (Guest)
on 2006-04-17 23:56
(Received via mailing list)
Is there anyway to make Rails NOT cache?  I'm getting caching in the
browser and the server.

I have to restart Lighttpd after every view change to see the results.

Thanks,
phill
Bryan D. (Guest)
on 2006-04-18 00:00
Phillip Novess wrote:
> Is there anyway to make Rails NOT cache?  I'm getting caching in the
> browser and the server.
>
> I have to restart Lighttpd after every view change to see the results.
>
> Thanks,
> phill

Are you doing development at this point? If so, you really don't want to
be using lighttpd - good old webrick will do the trick.

If script\server is running lighttpd and causing trouble, do
"script\server webrick" instead.
Dave S. (Guest)
on 2006-04-18 00:12
(Received via mailing list)
On Monday 17 Apr 2006 21:00, Bryan D. wrote:
> Are you doing development at this point? If so, you really don't want to
> be using lighttpd - good old webrick will do the trick.

I'm developing using Lighttpd and it's great - no caching problem at
all.
Can't say I ever noticed one?

Surely it can't be the default behaviour, otherwise why would support
for it
have been added if it was unusable because of caching issues?  Sounds
like
the culprit might be something else (eg. wrong configuration settings)
to me.

> If script\server is running lighttpd and causing trouble, do
> "script\server webrick" instead.

Though webrick does indeed do the job perfectly OK for development
purposes.

~Dave

--

Dave S.
Rent-A-Monkey Website Development
http://www.rentamonkey.com/

PGP Key: http://www.rentamonkey.com/pgpkey.asc
Bryan D. (Guest)
on 2006-04-18 00:19
Dave S. wrote:
> Surely it can't be the default behaviour, otherwise why would support
> for it
> have been added if it was unusable because of caching issues?  Sounds
> like
> the culprit might be something else (eg. wrong configuration settings)
> to me.

Oh yeah - make sure you're not in production mode. That would certainly
cause problems.
Giles B. (Guest)
on 2006-04-18 00:22
(Received via mailing list)
There's stuff abt this in the Agile book, and IIRC it's pretty
flexible/powerful, but I don't recall the specifics off the top of my
head (sorry). Google it with site:api.rubyonrails.com in the search,
tho, because it's definitely in there.

Giles



On 4/17/06, Dave S. <removed_email_address@domain.invalid> wrote:
> me.
> Dave S.
> Rent-A-Monkey Website Development
> http://www.rentamonkey.com/
>
> PGP Key: http://www.rentamonkey.com/pgpkey.asc
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Giles B.
http://www.gilesgoatboy.org
Phillip Novess (Guest)
on 2006-04-18 02:19
(Received via mailing list)
Thanks for all the responses.

I believe I'm in development mode.  At least the lighttpd.conf file has
the RAILS_ENV set to development.

The cache of the views I know was mentioned in the docs. I remember
something about the mod time is compared to render time to determine
whether it should be compiled.  However, I believe that when I edit
files via Samba on my Mac the mod time is n't updated correctly and
thus never gets recompiled until I restart.

The other caching problem is the cache in my browser.  In PHP I use to
set the headers for no-pragma cache.   How do you do this in Rails? My
browser is definitely caching.

Thanks,
phill



On Apr 17, 2006, at 2:21 PM, Giles B. wrote:

There's stuff abt this in the Agile book, and IIRC it's pretty
flexible/powerful, but I don't recall the specifics off the top of my
head (sorry). Google it with site:api.rubyonrails.com in the search,
tho, because it's definitely in there.

Giles



On 4/17/06, Dave S. <removed_email_address@domain.invalid> wrote:
> for it
> purposes.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Giles B.
http://www.gilesgoatboy.org
_______________________________________________
Rails mailing list
removed_email_address@domain.invalid
http://lists.rubyonrails.org/mailman/listinfo/rails
Steve K. (Guest)
on 2006-04-18 03:09
If your Samba server is misconfigured and not updating timestamps on
files, then fix the configuration of your Samba server.

Or better yet, don't develop by editing files on a remote fileshare. ;)

Phillip Novess wrote:
> Thanks for all the responses.
>
> I believe I'm in development mode.  At least the lighttpd.conf file has
> the RAILS_ENV set to development.
>
> The cache of the views I know was mentioned in the docs. I remember
> something about the mod time is compared to render time to determine
> whether it should be compiled.  However, I believe that when I edit
> files via Samba on my Mac the mod time is n't updated correctly and
> thus never gets recompiled until I restart.
>
> The other caching problem is the cache in my browser.  In PHP I use to
> set the headers for no-pragma cache.   How do you do this in Rails? My
> browser is definitely caching.
>
> Thanks,
> phill
>
>
>
> On Apr 17, 2006, at 2:21 PM, Giles B. wrote:
>
> There's stuff abt this in the Agile book, and IIRC it's pretty
> flexible/powerful, but I don't recall the specifics off the top of my
> head (sorry). Google it with site:api.rubyonrails.com in the search,
> tho, because it's definitely in there.
>
> Giles
>
This topic is locked and can not be replied to.