Friday, February 9, 2007

Purging Cache Without Shutting Down

You can purge web server and application server cache even when the system is up and running. This article will discuss how.

Search questions related to PeopleSoft Purging Cache Without Shutting Down on  MyAnswerBank

Before we begin, let me quote the PeopleTools 8.46 release notes:

You can purge the cache regardless of whether the application server domain is running; there's no need to shut it down and reboot. However, the procedure is less disruptive and runs more quickly if the domain is shut down or its activity is low.

And to quote PeopleBooks

Important! You should purge the cache only after due consideration, and in conslutation with PeopleSoft.

OK, the disclaimers are out of the way. Now let's get started.

Purging App Server Cache

Starting in PeopleTools 8.46, there's a new option in PSADMIN called Purge Cache under the Administer a Domain submenu. This option will purge application server cache even if the application server domain is up and running.

Select Purge Cache (option 8 in Tools 8.46.05) and if the cache is not empty the following prompt appears: "Enter log comments about this purge, if any (maximum 256 characters):"

Enter any comments you want recorded and hit Enter. Your comments will be saved in the LOGS directory under PurgeCache_mmddyy_hhmm_ss.log.

Then it will ask if you want to archive the contents of the current cache. I have no idea why anyone would ever want to archive cache, so I select No.

When prompted to continue, enter y to continue the purge operation. If your domain is running, you may see several INFO messages. This is normal, so don't sweat it. It also will take longer than just shutting down the domain and deleting the files so don't worry about the length of time it takes either.

We'll be using the "Purge" servlet directive to make it happen. Rich Manalang has the best and only post I'm aware of about PeopleSoft Servlet Directives at and explains how to do things like purge web server cache, reload your web profile, view your web profile, etc.

To set up your system for servlet directives you need to specify a password in your web profile. So open your web profile (PeopleTools > Web Profile > Web Profile Configuration), navigate to the Custom Properties tab, and look for a property called auditPWD. It should be set to a string, and the property value should be whatever password you want to set. The default is "dayoff". If you make any changes, you'll have to bounce your web server for it to take effect.

Once the auditPWD property is in place, you can simply call the psp servlet with the purge command, and your web server cache will be purged. The syntax of the URL is: http://[server]/psp/[site]/?cmd=purge&pwd=[password]

For example:

Anyway, update the URL with your specific info, paste it into your browser, and the web server cache will be cleared without a web server bounce.

As always, make sure you test these techniques in a non-production database, and use at your own risk! I hope you find them helpful.

Search questions related to PeopleSoft Purging Cache Without Shutting Down on  MyAnswerBank

PeopleSoft Servlet Directives

Over the past few years, I’ve run into several hidden PeopleTools tricks that I’ve never seen documented. I have no idea why PeopleTools decided not to document these, but I’ve found a lot of use for them.

Search questions related to PeopleSoft Servlet Directives on  MyAnswerBank

* http://[server]/psp/[site]/?cmd=reloadconfig&pwd=[password] — Reloads the Web Profile
* http://[server]/psp/[site]/?cmd=viewconfig&pwd=[password] — Displays currently cached Web Profile
* http://[server]/psp/[site]/?cmd=purge&pwd=[password] — Purges webserver memory cache (portal registry, etc.)
* http://[server]/psp/[site]/?cmd=viewcp&pwd=[password] — Displays cached node URIs
* http://[server]/psp/[site]/?cmd=viewsprop&pwd=[password] — Display’s session properties (doesn’t seem to work in 8.44+ anymore)
* http://[server]/psp/[site]/?cmd=debugCache&pwd=[password] — Cache Control Center… allows you to do all sorts of things with your web cache (8.45.05+ only)

The [password] parameter is defined in the Web Profile as a custom property called auditPWD.

Search questions related to PeopleSoft Servlet Directives on  MyAnswerBank