SensioFrameworkExtraBundle
SensioFrameworkExtraBundle copied to clipboard
Allow defining @Cache on abstract controller
Currently the @Cache annotation can be placed on a whole class, but it will not work if placed on an abstract class. It will greatly simplify scenarios like:
<?php
/**
* @Cache(maxage="0",smaxage="604800")
*/
class AbstractContentController
{
//...
}
class ArticlesController extends AbstractContentController
{
//...
}
class RecipesController extends AbstractContentController
{
//...
}
class ArchivesController extends AbstractContentController
{
//...
}