commit/galaxy-central: 2 new changesets
2 new changesets in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/7f8103057a43/ changeset: 7f8103057a43 user: kanwei date: 2011-10-05 06:15:37 summary: Typo affected #: 1 file (-1 bytes) --- a/lib/galaxy/util/__init__.py Tue Oct 04 23:29:08 2011 -0400 +++ b/lib/galaxy/util/__init__.py Wed Oct 05 00:15:37 2011 -0400 @@ -544,7 +544,7 @@ def size_to_bytes( size ): """ - Returns a number of bytes if given a reasably formatted string with the size + Returns a number of bytes if given a reasonably formatted string with the size """ # Assume input in bytes if we can convert directly to an int try: http://bitbucket.org/galaxy/galaxy-central/changeset/087a766b3eca/ changeset: 087a766b3eca user: kanwei date: 2011-10-05 06:18:15 summary: Cache bust using unix timestamp that server started on to force reloading of stylesheets and javascripts whenever server restarts affected #: 1 file (-1 bytes) --- a/lib/galaxy/web/framework/helpers/__init__.py Wed Oct 05 00:15:37 2011 -0400 +++ b/lib/galaxy/web/framework/helpers/__init__.py Wed Oct 05 00:18:15 2011 -0400 @@ -6,9 +6,12 @@ from galaxy.util.json import to_json_string from galaxy.util import hash_util from datetime import datetime, timedelta +import time from cgi import escape +server_starttime = int(time.time()) + # If the date is more than one week ago, then display the actual date instead of in words def time_ago( x ): delta = timedelta(weeks=1) @@ -38,20 +41,18 @@ Take a list of stylesheet names (no extension) and return appropriate string of link tags. - TODO: This has a hardcoded "?v=X" to defeat caching. This should be done - in a better way. + Cache-bust with time that server started running on """ - return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css?v=3" ) for name in args ] ) + return "\n".join( [ stylesheet_link_tag( "/static/style/" + name + ".css?v=%s" % server_starttime ) for name in args ] ) def js( *args ): """ Take a list of javascript names (no extension) and return appropriate string of script tags. - TODO: This has a hardcoded "?v=X" to defeat caching. This should be done - in a better way. + Cache-bust with time that server started running on """ - return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=8" ) for name in args ] ) + return "\n".join( [ javascript_include_tag( "/static/scripts/" + name + ".js?v=%s" % server_starttime ) for name in args ] ) # Hashes Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket