Freewheel (Read Only)
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

caching gone bad?

14 REPLIES 14
Reply
Message 1 of 15
nienberg
507 Views, 14 Replies

caching gone bad?

I'm testing the freewheel web service as a way to display dwf files on our website. One problem I've noticed is that the call to freewheel.autodesk.com is often answered without actually reading the dwf file from my website. (I can see in the webserver access logs when the dwf file is requested). Is this a case of the autodesk server caching the result after it generates the image once? In my case I am getting some empty results when I expect to see an image. I think the first time I requested the image, the dwf file did not exist on my server, but it does now.

Thanks,
14 REPLIES 14
Message 2 of 15
Anonymous
in reply to: nienberg

yes, the data is cached on the freewheel server, cant remember how long for,
think someone said a month.

easiest way to solve is rename the dwf file and update the html-code to
suit. Had the same problem myself, that freewheel still used the cached
data despite the local dwf being a different version - renaming the file to
something new forced it to re-upload the dwf and display the correct
version.


wrote in message news:5577848@discussion.autodesk.com...
I'm testing the freewheel web service as a way to display dwf files on our
website. One problem I've noticed is that the call to
freewheel.autodesk.com is often answered without actually reading the dwf
file from my website. (I can see in the webserver access logs when the dwf
file is requested). Is this a case of the autodesk server caching the
result after it generates the image once? In my case I am getting some
empty results when I expect to see an image. I think the first time I
requested the image, the dwf file did not exist on my server, but it does
now.

Thanks,
Message 3 of 15
nienberg
in reply to: nienberg

Thanks for your confirmation of the problem.

Is this something that Autodesk can fix? I am using freewheel to display a database full of details that are constantly changing. The dwf names correspond to the detail numbers. I could write a bunch of code to append a revision number or something, but that seems like an unnecessary pain in the neck.

Mark
Message 4 of 15
Anonymous
in reply to: nienberg

Project Freewheel (http://dwfit.com) and Autodesk Freewheel
(http://freewheel.autodesk.com) obey the cache headers set on your server.
If you set them, we will honor them. If you do not set them, we use a
timeout value of 4.5 days. So in the future, you can set your cache headers
to a shorter time period. For this instance, you can wait 4.5 days.

wrote in message news:5578765@discussion.autodesk.com...
Thanks for your confirmation of the problem.

Is this something that Autodesk can fix? I am using freewheel to display a
database full of details that are constantly changing. The dwf names
correspond to the detail numbers. I could write a bunch of code to append a
revision number or something, but that seems like an unnecessary pain in the
neck.

Mark
Message 5 of 15
nienberg
in reply to: nienberg

Ah, that's interesting. I'll try setting a short cache for the directory that holds dwf files and see if that fixes it. Thanks for your help!
Message 6 of 15
Anonymous
in reply to: nienberg

as a thought, would it be possible, and easier, to just compare the cached
and users' files dates and sizes? If size is different then either the file
has changed, or even the cached data is possibly incomplete/corrupted.

Just thinking that not everyone has knowledge of cache-headers and this
problem may well re-appear much like the "text doesn't work" comments of
Inventor.

what do you think m8?

"Scott Sheppard - Autodesk" wrote in message
news:5578800@discussion.autodesk.com...
Project Freewheel (http://dwfit.com) and Autodesk Freewheel
(http://freewheel.autodesk.com) obey the cache headers set on your server.
If you set them, we will honor them. If you do not set them, we use a
timeout value of 4.5 days. So in the future, you can set your cache headers
to a shorter time period. For this instance, you can wait 4.5 days.

wrote in message news:5578765@discussion.autodesk.com...
Thanks for your confirmation of the problem.

Is this something that Autodesk can fix? I am using freewheel to display a
database full of details that are constantly changing. The dwf names
correspond to the detail numbers. I could write a bunch of code to append a
revision number or something, but that seems like an unnecessary pain in the
neck.

Mark
Message 7 of 15
Anonymous
in reply to: nienberg

Doing things based on file size (could change but have same size) or date
(times on machines vary) is dangerous. For obvious performance reasons, we
don't want our server to go get the DWF file every time. So we pick 4.5 days
as a way to balance performance versus being up to date with DWF file
changes. For people who have DWF files that change frequently, they can set
the cache header to a value like 1 day.

"Sam M" wrote in message
news:5579613@discussion.autodesk.com...
as a thought, would it be possible, and easier, to just compare the cached
and users' files dates and sizes? If size is different then either the file
has changed, or even the cached data is possibly incomplete/corrupted.

Just thinking that not everyone has knowledge of cache-headers and this
problem may well re-appear much like the "text doesn't work" comments of
Inventor.

what do you think m8?

"Scott Sheppard - Autodesk" wrote in message
news:5578800@discussion.autodesk.com...
Project Freewheel (http://dwfit.com) and Autodesk Freewheel
(http://freewheel.autodesk.com) obey the cache headers set on your server.
If you set them, we will honor them. If you do not set them, we use a
timeout value of 4.5 days. So in the future, you can set your cache headers
to a shorter time period. For this instance, you can wait 4.5 days.

wrote in message news:5578765@discussion.autodesk.com...
Thanks for your confirmation of the problem.

Is this something that Autodesk can fix? I am using freewheel to display a
database full of details that are constantly changing. The dwf names
correspond to the detail numbers. I could write a bunch of code to append a
revision number or something, but that seems like an unnecessary pain in the
neck.

Mark
Message 8 of 15
Anonymous
in reply to: nienberg

Inside the cache-header window doing it based on the size might make sense.
If the dwf has changed, chances of the size being the same is pretty slim.
Even if the size was the same - you are no worse than how its done now.

--
Sriram Gopalakrishnan
DWF
Autodesk
Message 9 of 15
Anonymous
in reply to: nienberg

We are trying to strike a balance. Cache headers were made specifically for
this purpose. We don't want our server doing extra work of checking file
size data on the machine where the file is located. We are happy to document
our 4.5 day timeout and let people specify something smaller if they want.
My fear is that thousands of user swill specify ridiculous values of
something like "1 hour" and our machine will get swamped with requests to go
get people's DWF files.

"Sriram Gopalakrishnan - Autodesk" wrote
in message news:5583454@discussion.autodesk.com...
Inside the cache-header window doing it based on the size might make sense.
If the dwf has changed, chances of the size being the same is pretty slim.
Even if the size was the same - you are no worse than how its done now.

--
Sriram Gopalakrishnan
DWF
Autodesk
Message 10 of 15
Anonymous
in reply to: nienberg

The Freewheel server can simply ask the original web server if the DWF has
changed. The problem is that depending on the speed of the server hosting
the original DWF this check can take up to 2 seconds. When should this check
happen? It would be foolish to check on every pan or orbit. It would also be
foolish to never check the original DWF again. The HTTP spec. solves the
problem by defining cache headers that tell downstream readers how long an
HTTP response is valid. The Freewheel server honors these headers when they
are set. The problem Sam is running into is with what the Freewheel server
does when the HTTP cache headers have not been set. In this case, Freewheel
will check the server that hosts the DWF file after 4½ days. This is a
reasonable compromise between dynamic and static data. Again, to work around
this, set the HTTP cache headers appropriately.

That being said, we are currently working on a solution to this problem, but
I can not go into the details about how it works at this time.

Ben Cochran
Autodesk Labs - Freewheel

"Sriram Gopalakrishnan - Autodesk" wrote
in message news:5583454@discussion.autodesk.com...
Inside the cache-header window doing it based on the size might make sense.
If the dwf has changed, chances of the size being the same is pretty slim.
Even if the size was the same - you are no worse than how its done now.

--
Sriram Gopalakrishnan
DWF
Autodesk
Message 11 of 15
nienberg
in reply to: nienberg

I've confirmed that FreeWheel honors the expire header if I set it explicitly, but your 4.5 day timeout when there is no expire header does not seem to work. After about 10 days of waiting I finally changed the name of my dwf directory to force FreeWheel to start fresh.

In my case I had initially requested images of dwf files that did not exist, so when freewheel requested them from my server, it was probably given a page not found error. After that, it would always return a blank viewer for that dwf, even after I put the dwf file in the right place so it would be found.
Message 12 of 15
Anonymous
in reply to: nienberg

Thank you for this feedback. We will look into it.

wrote in message news:5591303@discussion.autodesk.com...
I've confirmed that FreeWheel honors the expire header if I set it
explicitly, but your 4.5 day timeout when there is no expire header does not
seem to work. After about 10 days of waiting I finally changed the name of
my dwf directory to force FreeWheel to start fresh.

In my case I had initially requested images of dwf files that did not exist,
so when freewheel requested them from my server, it was probably given a
page not found error. After that, it would always return a blank viewer for
that dwf, even after I put the dwf file in the right place so it would be
found.
Message 13 of 15
sbower
in reply to: nienberg

Regarding caching, I may not want to change the cache settings for my entire site just to accommodate Freewheel's caching policy.

I also may be using freewheel on my site against URL's containing DWF's from a third remote site where I have no control over their servers caching.

Can you add an optional parameter to your server which allows me to use a: ,,,,&forcecachereload=1 sort of option?

Commenting on previous discussion, checking changes in the file based on file sizes is obviously a bad idea, however you could certainly checksum them. In fact, (I'd bet but I'm guessing) that the DWF format itself has a checksum in the file? If so, perhaps you could use that to first use the checksum to validate your cached version and upload the rest of the file if the checksum is different.
(of course now you're trading off two roundtrips, but given the size of the files, it's probably worth it.)

-Steve.
Message 14 of 15
Anonymous
in reply to: nienberg

In our opinion cache headers are specifically designed to tell us when to
check.

wrote in message news:5666925@discussion.autodesk.com...
Regarding caching, I may not want to change the cache settings for my entire
site just to accommodate Freewheel's caching policy.

I also may be using freewheel on my site against URL's containing DWF's from
a third remote site where I have no control over their servers caching.

Can you add an optional parameter to your server which allows me to use a:
,,,,&forcecachereload=1 sort of option?

Commenting on previous discussion, checking changes in the file based on
file sizes is obviously a bad idea, however you could certainly checksum
them. In fact, (I'd bet but I'm guessing) that the DWF format itself has a
checksum in the file? If so, perhaps you could use that to first use the
checksum to validate your cached version and upload the rest of the file if
the checksum is different.
(of course now you're trading off two roundtrips, but given the size of the
files, it's probably worth it.)

-Steve.
Message 15 of 15
Anonymous
in reply to: nienberg

Cache headers can be set for the whole site, a whole directory or just a
single file.



Also, the cache headers tell the Freewheel server when to check. If the time
has elapsed, the Freewheel server will check to see if the DWF is newer and
will only download the DWF if it is newer. Your suggestion is checking every
time is a good one. The problem is how often should the Freewheel server
check? The check can take more than a second depending several variables.
Should the server check after each frame? That would not work. Even a check
every hour, would be much for some servers. It is best to set the cache
headers on your DWF files and tell the Freewheel servers how often to check.



Ben



wrote in message news:5666925@discussion.autodesk.com...
Regarding caching, I may not want to change the cache settings for my entire
site just to accommodate Freewheel's caching policy.

I also may be using freewheel on my site against URL's containing DWF's from
a third remote site where I have no control over their servers caching.

Can you add an optional parameter to your server which allows me to use a:
,,,,&forcecachereload=1 sort of option?

Commenting on previous discussion, checking changes in the file based on
file sizes is obviously a bad idea, however you could certainly checksum
them. In fact, (I'd bet but I'm guessing) that the DWF format itself has a
checksum in the file? If so, perhaps you could use that to first use the
checksum to validate your cached version and upload the rest of the file if
the checksum is different.
(of course now you're trading off two roundtrips, but given the size of the
files, it's probably worth it.)

-Steve.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report