private function makeCacheKey(array $arg, $widget, string $form): string
    {
        if (method_exists($widget, 'cacheKey')) {
            return $widget->cacheKey($arg);
        }

        $_key = '';

        if (method_exists($widget, 'extraCacheKeyDependency')) {
            $_key = json_encode($widget->extraCacheKeyDependency($arg));
        }

        if (! $this->cacheDriverSupportsTags()) {
            $_key .= json_encode($this->getTagTokens($widget->cacheTags));
        }

        $_key .= json_encode($arg, JSON_FORCE_OBJECT).app()->getLocale().$form.$widget->template.get_class($widget);

        return md5($_key);
    }
private function makeCacheKey(array $arg, $widget, string $form): string
    {
        if (method_exists($widget, 'cacheKey')) {
            return $widget->cacheKey($arg);
        }

        $_key = '';

        if (method_exists($widget, 'extraCacheKeyDependency')) {
            $_key = json_encode($widget->extraCacheKeyDependency($arg));
        }

        if (! $this->cacheDriverSupportsTags()) {
            $_key .= json_encode($this->getTagTokens($widget->cacheTags));
        }

        $_key .= json_encode($arg, JSON_FORCE_OBJECT).app()->getLocale().$form.$widget->template.get_class($widget);

        return md5($_key);
    }
private function makeCacheKey ( array $ arg , $ widget , string $ form ) : string { if ( method_exists ( $ widget , 'cacheKey' ) ) { return $ widget -> cacheKey ( $ arg ) ; } $ _key = '' ; if ( method_exists ( $ widget , 'extraCacheKeyDependency' ) ) { $ _key = json_encode ( $ widget -> extraCacheKeyDependency ( $ arg ) ) ; } if ( ! $ this -> cacheDriverSupportsTags ( ) ) { $ _key .= json_encode ( $ this -> getTagTokens ( $ widget -> cacheTags ) ) ; } $ _key .= json_encode ( $ arg , JSON_FORCE_OBJECT ) . app ( ) -> getLocale ( ) . $ form . $ widget -> template . get_class ( $ widget ) ; return md5 ( $ _key ) ; }
Creates a unique cache key for each possible output.

@param array $arg
@param object $widget
@param string $form
@return string An MD5 string
Creates a unique cache key for each possible output .