Closure Compiler is caching my source files

424 views
Skip to first unread message

Jake

unread,
Jan 31, 2012, 3:28:50 PM1/31/12
to Closure Compiler Discuss
Today I was having a problem where the compiler wasn't fetching the
new version of the source files from my site. I had changed the
source files to fix a warning that the compiler had given me. Then I
went in and recompiled it, but the warning was still there and the
code changes that I had made were not picked up. Is the closure
compiler caching the source files? I would rather not have to version
my filenames every time I have to compile. Is there a way to force
the compiler to download a fresh copy of the source files?

Nick Santos

unread,
Feb 7, 2012, 8:28:52 AM2/7/12
to closure-comp...@googlegroups.com
Are you talking about closure-compiler.appspot.com, or one of the
other versions of the compiler?

I don't think we do any caching when you request a compile. can you
give more details? Maybe the cache headers are being set improperly on
the web server you're serving the code from?

Relatedly, fwiw, the closure-compiler.appspot.com is mostly there as a
demo service so you can try it out quickly. If you're looking for a
more robust way to do interactive development, you're probably better
off using plovr.org.

Sorry for the delay in responding; your message got caught in our spam
filter accidentally:
http://groups.google.com/group/closure-compiler-discuss/browse_thread/thread/90fc1f02e3ae7d4d

Nick

Alan Leung

unread,
Jul 26, 2012, 9:36:18 PM7/26/12
to closure-comp...@googlegroups.com
The compilation service doesn't cache input.

Can you show us some reproducible case?  Are you sure it isn't your server that is caching?

-Alan

On Thu, Jul 26, 2012 at 6:06 PM, <rocc...@gmail.com> wrote:
>BUMP<  the closure REST api has a really sticky cache still. Any chance this is going to get fixed?

Nick Santos

unread,
Aug 29, 2012, 10:36:41 AM8/29/12
to closure-comp...@googlegroups.com, kahne.ra...@gmail.com
http://yourbugreportneedsmore.info/
Specific URLs please

On Wednesday, August 29, 2012, sergio toledo <sto...@oonair.com> wrote:
> It has also happened to me. For longer than 2 hours, closure compiler's rest api and online tester was compiling an old version of my code. Suddenly, without changing anything, it got last version of code and compilation worked ok. My "server" (amazon s3 service) was not doing any cache, I could get my code's last version without any problems.
>
> On Wednesday, August 29, 2012 5:40:22 AM UTC+2, kahne.ra...@gmail.com wrote:
>>
>> i'm having the same problem... it seems to be caching files :(

John Lenz

unread,
Aug 30, 2012, 2:50:36 AM8/30/12
to closure-comp...@googlegroups.com

Can anyone provide a problem url? I suspect the problem is the file isnt configured to expire immediately (that has always been the problem in the past) but without a url we cant confirm that.

On Aug 29, 2012 2:17 PM, <kahne.ra...@gmail.com> wrote:
With the online version of the compiler... I found just adding random query string parameters resolved the caching issue :)

e.g. www.test.com/myjsfile.js?v=1

"v=1" 2,3,4,5,56....

John Lenz

unread,
Aug 30, 2012, 7:24:24 PM8/30/12
to closure-comp...@googlegroups.com

Are you proving the entire source in the rest request? Not just a source url?

On Aug 30, 2012 4:13 AM, <sto...@oonair.com> wrote:
Thanks for your reply and I appreciate your help. 
I'm sorry. but I don't understand. How can I configure the file to expire immediately?.Do you mean by setting cache-control header in my http request to the rest api?

Thanks again.

John Lenz

unread,
Aug 31, 2012, 2:15:10 PM8/31/12
to closure-comp...@googlegroups.com

Right. It is the server hosting your url that is likely to including a cache header that allows it to be cached.

On Aug 31, 2012 5:41 AM, "Sergio Toledo" <sto...@oonair.com> wrote:
I'm sending file's url to http://closure-compiler.appspot.com in rest request as well as web interface. Finally, I've chosen to send a random query string parameter in my url. ('code_url', 'http://www.whatever.com/file.js?rp=ifuhasofd'). This way works fine. It is not very elegant, but it works.

Anyway, thanks for your help.
Reply all
Reply to author
Forward
0 new messages