src/drivers/AbstractPurger.php
public function getTaggedUrls($tag)
    {
        // Use fulltext for mysql or array field for pgsql
        $sql = \Craft::$app->getDb()->getIsMysql()
            ? "SELECT uid, url FROM %s WHERE MATCH(tags) AGAINST (%s IN BOOLEAN MODE)"
            : "SELECT uid, url FROM %s WHERE tags @> (ARRAY[%s]::varchar[])";

        // Replace table name and tag
        $sql = sprintf(
            $sql,
            \Craft::$app->getDb()->quoteTableName(Plugin::CACHE_TABLE),
            \Craft::$app->getDb()->quoteValue($tag)
        );

        // Execute the sql
        $results = \Craft::$app->getDb()
            ->createCommand($sql)
            ->queryAll();

        if (count($results) === 0) {
            return [];
        }

        return ArrayHelper::map($results, 'uid', 'url');

    }
public function getTaggedUrls($tag)
    {
        // Use fulltext for mysql or array field for pgsql
        $sql = \Craft::$app->getDb()->getIsMysql()
            ? "SELECT uid, url FROM %s WHERE MATCH(tags) AGAINST (%s IN BOOLEAN MODE)"
            : "SELECT uid, url FROM %s WHERE tags @> (ARRAY[%s]::varchar[])";

        // Replace table name and tag
        $sql = sprintf(
            $sql,
            \Craft::$app->getDb()->quoteTableName(Plugin::CACHE_TABLE),
            \Craft::$app->getDb()->quoteValue($tag)
        );

        // Execute the sql
        $results = \Craft::$app->getDb()
            ->createCommand($sql)
            ->queryAll();

        if (count($results) === 0) {
            return [];
        }

        return ArrayHelper::map($results, 'uid', 'url');

    }
public function getTaggedUrls ( $ tag ) { // Use fulltext for mysql or array field for pgsql $ sql = \ Craft :: $ app -> getDb ( ) -> getIsMysql ( ) ? "SELECT uid, url FROM %s WHERE MATCH(tags) AGAINST (%s IN BOOLEAN MODE)" : "SELECT uid, url FROM %s WHERE tags @> (ARRAY[%s]::varchar[])" ; // Replace table name and tag $ sql = sprintf ( $ sql , \ Craft :: $ app -> getDb ( ) -> quoteTableName ( Plugin :: CACHE_TABLE ) , \ Craft :: $ app -> getDb ( ) -> quoteValue ( $ tag ) ) ; // Execute the sql $ results = \ Craft :: $ app -> getDb ( ) -> createCommand ( $ sql ) -> queryAll ( ) ; if ( count ( $ results ) === 0 ) { return [ ] ; } return ArrayHelper :: map ( $ results , 'uid' , 'url' ) ; }
Get cached urls by given tag

Example result
[
'2481f019-27a4-4338-8784-10d1781b' => '/services/development'
'a139aa60-9b56-43b0-a9f5-bfaa7c68' => '/services/app-development'
]

@param string $tag

@return array
@throws \yii\db\Exception
Get cached urls by given tag