Jake Vanderwerf
2025-11-04 42fa8304ddb811b0f725f245130f70c0f5e86a6c
icons.php
@@ -171,6 +171,7 @@
      'project'      => 'code',
      'map'       => 'map-trifold',
      'offer'        => 'gift',
      'referrals'    => 'hand-heart'
   ];
@@ -374,10 +375,11 @@
    public function __construct()
    {
      $this->cache = new CacheManager('icons', 604800); //1 week in seconds
      $this->cache = CacheManager::for('icons', WEEK_IN_SECONDS);
//    $this->cache->invalidateGroup('icons');
      $this->style = JVB_SITE['icons']??'regular';
      $this->used = get_option(BASE.'used_icons', [
         $this->style => [
            'heart',
@@ -475,7 +477,8 @@
            'location',
            'hours',
            'star',
            'star-half'
            'star-half',
            'exclamation-mark'
         ],
         'fill'   => [
            'heart',
@@ -544,13 +547,12 @@
            'color' => 'currentColor'
        ], $options);
      $icon = $this->cache->remember(
      return $this->cache->remember(
         array_merge($options, ['name' => $name]),
         function () use ($name, $options) {
            return $this->buildIcon($name, $options);
         }
      );
      return $icon;
    }
    public function getIconsByGroup(string $group):array