diff --git a/docs/upgrades/templates-6.99.0/wgtemplate_table_default_page.tmpl b/docs/upgrades/templates-6.99.0/wgtemplate_table_default_page.tmpl
index e3b58250e..a411f017d 100755
--- a/docs/upgrades/templates-6.99.0/wgtemplate_table_default_page.tmpl
+++ b/docs/upgrades/templates-6.99.0/wgtemplate_table_default_page.tmpl
@@ -1,4 +1,4 @@
-#PBtmpl0000000000000054
+#PBtmpl000000000table54
diff --git a/lib/WebGUI/Group.pm b/lib/WebGUI/Group.pm
index bf2c3ca84..91931c863 100755
--- a/lib/WebGUI/Group.pm
+++ b/lib/WebGUI/Group.pm
@@ -151,8 +151,7 @@ An override for the default offset of the grouping. Specified in seconds.
sub addUsers {
my $self = shift;
my $users = shift;
- WebGUI::Cache->new($self->session, $self->getId)->delete;
- $self->session->stow->delete("isInGroup");
+ $self->clearCaches();
my $expireOffset = shift || $self->get("expireOffset");
foreach my $uid (@{$users}) {
next if ($uid eq '1' and !isIn($self->getId, 1, 7));
diff --git a/t/Group.t b/t/Group.t
index d54040980..886c7df46 100644
--- a/t/Group.t
+++ b/t/Group.t
@@ -18,6 +18,7 @@ use WebGUI::Utility;
use WebGUI::User;
use WebGUI::Group;
+use WebGUI::Cache;
use Test::More;
use Test::Deep;
@@ -77,6 +78,7 @@ my @ipTests = (
plan tests => (88 + scalar(@scratchTests) + scalar(@ipTests)); # increment this value for each test you create
my $session = WebGUI::Test->session;
+WebGUI::Cache->new($session, 'myKey')->flush();
my $g = WebGUI::Group->new($session, "new");
diff --git a/t/User.t b/t/User.t
index f4f6c2599..6736acaac 100644
--- a/t/User.t
+++ b/t/User.t
@@ -15,12 +15,15 @@ use lib "$FindBin::Bin/lib";
use WebGUI::Test;
use WebGUI::Session;
use WebGUI::Utility;
+use WebGUI::Cache;
use WebGUI::User;
-use Test::More tests => 81; # increment this value for each test you create
+use Test::More tests => 85; # increment this value for each test you create
my $session = WebGUI::Test->session;
+WebGUI::Cache->new($session, 'myKey')->flush();
+
my $user;
my $lastUpdate;
@@ -247,7 +250,7 @@ ok ($visitor->isInGroup($cm->getId), "Visitor is allowed in via IP");
$session->db->write('update userSession set lastIP=? where sessionId=?',['193.168.0.101', $session->getId]);
-$session->stow->delete('isInGroup');
+$cm->clearCaches;
ok (!$visitor->isInGroup($cm->getId), "Visitor is not allowed in via IP");
@@ -259,6 +262,7 @@ $user = WebGUI::User->new($session, "new");
$user->addToGroups([3]);
+$session->errorHandler->warn('userId: '. $user->userId);
ok($user->isInGroup(3), "addToGroups: New user is in group 3(Admin)");
ok($user->isInGroup(11), "New user is in group 11(Secondary Admins)");
ok($user->isInGroup(12), "New user is in group 12(Turn On Admin)");
@@ -267,10 +271,16 @@ ok($user->isInGroup(14), "New user is in group 14(Product Managers)");
$user->deleteFromGroups([3]);
ok(!$user->isInGroup(3), "deleteFromGroups: New user is not in group 3(Admin)");
-ok(!$user->isInGroup(11), "New user is not in group 11(Secondary Admins)");
-ok(!$user->isInGroup(12), "New user is not in group 12(Turn On Admin)");
-ok(!$user->isInGroup(13), "New user is not in group 13(Export Managers)");
-ok(!$user->isInGroup(14), "New user is not in group 14(Product Managers)");
+ok($user->isInGroup(11), "New user still in group 11 due to caching (Secondary Admins)");
+ok($user->isInGroup(12), "New user still in group 12 due to caching (Turn On Admin)");
+ok($user->isInGroup(13), "New user still in group 13 due to caching (Export Managers)");
+ok($user->isInGroup(14), "New user still in group 14 due to caching (Product Managers)");
+
+WebGUI::Cache->new($session, 'myKey')->flush();
+ok($user->isInGroup(11), "Flush cache, new user not in group 11 (Secondary Admins)");
+ok($user->isInGroup(12), "Flush cache, new user not in group 12 (Turn On Admin)");
+ok($user->isInGroup(13), "Flush cache, new user not in group 13 (Export Managers)");
+ok($user->isInGroup(14), "Flush cache, new user not in group 14 (Product Managers)");
$user->delete;