SensioFrameworkExtraBundle icon indicating copy to clipboard operation
SensioFrameworkExtraBundle copied to clipboard

Allow defining @Cache on abstract controller

Open kiler129 opened this issue 6 years ago • 0 comments

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
{
    //...
}

kiler129 avatar Mar 11 '19 13:03 kiler129