Skip to content

Commit 18590aa

Browse files
authored
Merge pull request #3 from Cyber-Duck/feature/bug_fix
Fixed the cache bug
2 parents c9695fb + e0a2cd0 commit 18590aa

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Controller/PardotController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function getDynamicContent()
161161
]));
162162
}
163163
$contentList = $contents->Sort('Title')->map();
164-
$cache->set(self::$DYNAMIC_CONTENTS_CACHE_KEY, serialize($formList), static::getCacheDuration());
164+
$cache->set(self::$DYNAMIC_CONTENTS_CACHE_KEY, serialize($contentList), static::getCacheDuration());
165165

166166
return $contentList;
167167
}

src/Provider/PardotShortCodeProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ public static function PardotForm($arguments, $content, $parser, $shortcode, $ex
3939
$form = unserialize($cache->get(self::formCacheKey($arguments['id'])));
4040
}
4141

42+
4243
if (! $form) {
4344
$form = PardotApiService::getApi()->form()->read($arguments['id']);
44-
$cache->set(self::formCacheKey($arguments['id']), serialize($content), static::getCacheDuration());
45+
$cache->set(self::formCacheKey($arguments['id']), serialize($form), static::getCacheDuration());
4546
}
4647

4748
$code = $form->embedCode;

0 commit comments

Comments
 (0)