I could just use the default but this way I know what it's doing. I also 
release more than I restart so that does not matter to me. Clustering would be 
a problem

On Apr 9, 2013, at 8:39 AM, Dmitry Gusev <[email protected]> wrote:

> Barry,
> 
> no need to pass current date as application version, because if you don't
> supply any defaults then
> tapestry will generate random version for you.
> 
> But this may have some limitations if you're running in a clustered
> environment.
> 
> Also your clients will get new assets every time you restart your server.
> 
> See this:
> http://mail-archives.apache.org/mod_mbox/tapestry-users/201005.mbox/%[email protected]%3e
> 
> 
> On Tue, Apr 9, 2013 at 5:26 PM, Barry Books <[email protected]> wrote:
> 
>> After being bitten by APPLICATION_VERSION I switched to this
>> 
>> configuration.override(SymbolConstants.APPLICATION_VERSION,
>> *new*Date().getTime());
>> 
>> 
>> This way on my development machine I get a new version every restart and on
>> my production machine on every deploy.
>> 
>> 
>> That said I think the hash of the object in the URL and a never expires
>> header is the way to handle this. The only problem I can think of is assets
>> in style sheets. I would say the solution to that problem lookup the asset
>> with the hashed url and return the object with a never expires header. If
>> there is no hash just return the object without the header. This makes it
>> easy to use assets in stylesheets. If you want to solve the caching problem
>> just override (or declare) the style in the Layout component and use the
>> asset like this:
>> 
>> 
>> <style>
>> 
>> .navbar-fixed-top {
>> 
>>    xheight: 64px;
>> 
>>     background-position: 0px 40px;
>> 
>>    xbackground-image: url('${context:/images/top-background.jpg}');
>> 
>>    xbackground-repeat: repeat-x;
>> 
>>    }
>> 
>> </style>
> 
> 
> 
> -- 
> Dmitry Gusev
> 
> AnjLab Team
> http://anjlab.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to