It seems that the symfony generator needs a primary key. If there’s no PK defined the generator throws the following exception:

symfony generator Invalid column name ‘id’

In some blog post they solved the problem by adding a primary key to the concerning table. But in my case the DB isn’t under my control, so I found out that it is enough to set the primary key only in the schema.

In Symfony the stylesheets and javascript files are defined in the view.yml. Sometimes the problem appears that the browsers cache these files, even if there where some changes in the last release without refreshing the new contents.

There is a common technique to instruct the browser to take the new file version: Browsers store different file versions for different GET paramters. So if you include a CSS file like this:

<script type="text/javascript" src="css/styles.css?v=21"></script>

and in the next version with a higher version number (v=22), the browser will use (and cache) the newer version.

In our case we save the current version number (SVN) into the app.yml and we use this number as increasing GET-Parameter to force a cache refresh:

I had the problem, that symfony had no write permissons to create the cache files in the Windows Azure approot folder.

After some research I found out, that it is possible to allocate local storage where the role user has write permissions. The disadvantage though is, that the local storage is not persistent, that means, it will be reset after role upgrades, instance reimage or reboots. But for caching I don’t need a persistent storage.

To get it running you need the folowing settings:

ServiceDefinition.csdef

Define a local resource, in this case with the folder name “FileCacheStorage” and the size 1000MB:

Notice: When you are testing in your local dev environment the local storage path is completely different (more information here), so I decided to change the path only in the cloud env, because locally I have no write problems. To get the recent drive letter I take it from $_SERVER['TEMP'].