caching issues?

3,366 views
Skip to first unread message

jc

unread,
Sep 8, 2011, 9:12:38 AM9/8/11
to Vagrant
Hi I'm a Frontend developer and new to vagrant. We're installing it as
part of our development process within our work environment.

The environment details are:
CentOs release 5.6 (Final)
Kernal 2.6.18-238.el5 on an x86_64

We're experiencing and issue where small amends to files (for instance
changing the style of a P tag in the css file) aren't being reflected
by the vagrant machine (i.e. when you refresh the browser that's
viewing the site running within the vagrant machine, the updates
aren't being shown - within the page rendering or the actual css
file).

If however you make great swathing changes (delete the whole content
of the file and replace with something else), these changes are shown.

I'm not running a cache in the browser and have tried clearing the
cache and fully refreshing the page.

The only thing that seems to work is a full reload of vagrant, which
obviously isn't ideal.

Would anyone have any pointers as to what might be happening and how
we might go about resolving?

Many thanks

JC

Mitchell Hashimoto

unread,
Sep 8, 2011, 12:40:51 PM9/8/11
to vagra...@googlegroups.com
JC,

What you're seeing is probably because the server serving the static files is using the "sendfile()" syscall, which is broken with the VirtualBox file system. You need to disable sendfile() usage in your server. For Apache:

EnableSendfile off

And for nginx:

sendfile off;

Best,
Mitchell

jc

unread,
Sep 8, 2011, 2:07:23 PM9/8/11
to Vagrant

Perfect! Thanks Mitchell

Our Apache conf didn't have that line in so we added it and all seems
ok now.

Also, for anyone else reading a colleague found this link, after
Michell's advice, that explains

http://forums.virtualbox.org/viewtopic.php?f=3&t=1940&p=6680&hilit=shared+folder+apache

Best

JC

On Sep 8, 5:40 pm, Mitchell Hashimoto <mitchell.hashim...@gmail.com>
wrote:
> JC,
>
> What you're seeing is probably because the server serving the static files
> is using the "sendfile()" syscall, which is broken with the VirtualBox file
> system. You need to disable sendfile() usage in your server. For Apache:
>
> EnableSendfile off
>
> And for nginx:
>
> sendfile off;
>
> Best,
> Mitchell
>
>
>
> On Thu, Sep 8, 2011 at 6:12 AM, jc <jcrough...@gmail.com> wrote:
> > Hi I'm a Frontend developer and new to vagrant. We're installing it as
> > part of our development process within our work environment.
>
> > The environment details are:
> > CentOs release 5.6 (Final)
> > Kernal2.6.18-238.el5 on an x86_64
Reply all
Reply to author
Forward
0 new messages