1. fanstatic
  2. fanstatic
  3. fanstatic
  4. Issues
Issue #40 resolved

consider other 'version' parameters in fanstatic URLs

Jan-Jaap Driessen
created an issue

At this moment we use a hash of the library contents as the 'version' parameter in fanstatic URLs for caching and no-caching purposes.

When a Library has been released as part of a python package and thus has a version number, we can use this version number, as the contents of the release are not expected to change.

URLs could look like this:

http://localhost/fanstatic/jquery/:version:1.4.3/jquery.js

I created a branch of fanstatic in which this idea has been implemented:

<<changeset bda4261398bf>>

The changes are:

1) Upon loading the libraries from the entry points, the version of the python package is used in setting the version of the fanstatic Library. This happens only if the package is not installed in development mode.

2) factored out the :hash: identifier into a constant, so it can be used in composing URLs and serving them.

The benefits of these changes are 1) faster load times during development by not calculating the hash of every needed library for each request and 2) re-using version information from the python package.

I would like to know whether this behavior is wanted. If so, I will merge the branch with the default branch and polish the tests and docs. I would also like to hear everybody's opinion on the identifier in the URL: 'id', ':hash:', ':version:' or other?

Comments (1)

  1. Log in to comment