Question
375008155608
US
Last activity: 26 Dec 2019 22:45 EST
How to clear caches in 8.1
In 8.1, SMA is no longer a thing. How do I clear various caches in 8.1? In particular, I'm trying to clear the rule resolution cache.
-
Like (0)
jekry tehe -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hello Jerome
Thanks for pointing out your problem with Custom Functions (RUFs) not being recognized! Yes, that problem did exist and has been resolved in all current up to date patch releases of Pega 8 Infinity. e.g (8.1.6, 8.2.3, 8.3, etc.)
With that change, I hope that you never have to do those table truncations again
Thanks
Pegasystems Inc.
US
You can clear the caches using the Pega API api
Cache Management (Pega API)
You can clear the caches using the Pega API api
Cache Management (Pega API)
- REST APIs to manage VTable Cache across all nodes in the cluster
- REST APIs to manage Conclusion Cache across all nodes in the cluster
- REST APIs to manage Declarative Page Cache across all nodes in the cluster
- REST APIs to manage Declarative Rule Cache across all nodes in the cluster
- REST APIs to manage Rule Cache across all nodes in the cluster
- REST APIs to clear ABA Cache across all nodes in the cluster
- REST APIs to list and clear requestor pools across all nodes in the cluster
to use the Pega API - you can switch to the Admin Studio workspace - see https://community.pega.com/sites/default/files/help_v81/pxadminstudio/procomhelpmain.htm
and open the Pega API page - it will list all the entry point for the Pega API
for more details https://community.pega.com/knowledgebase/articles/pega-api-pega-platform
375008155608
US
Thanks Richard. Do you know if there are any future plans to add calls to these API into the admin portal in a more user friendly type of manor? I suppose that I could build that functionality into our environment, but I'll not worry about it if it is something that may be an enhancement in the future.
Also, just before seeing your comment, I ran the following query and did a cycle, which ultimately fixed my issue as well. Next time, I will give the API a try.
Thanks Richard. Do you know if there are any future plans to add calls to these API into the admin portal in a more user friendly type of manor? I suppose that I could build that functionality into our environment, but I'll not worry about it if it is something that may be an enhancement in the future.
Also, just before seeing your comment, I ran the following query and did a cycle, which ultimately fixed my issue as well. Next time, I will give the API a try.
truncate table pegadata.pr_sys_queue_ftsindexer;
truncate table pegadata.pr_sys_queues;
truncate table pegadata.pr_log;
truncate table pegadata.pc_history_work;
truncate table pegadata.pr_sys_statusnodes;
truncate table pegarules.PR_SYS_CACHE_ENTRY;
truncate table pegarules.PR_SYS_CACHE_IMPL;
truncate table pegarules.PR_SYS_CACHE_DEP;
truncate table pegarules.PR4_rule_sysgen;
truncate table pegarules.pr_assembledclasses;
Pegasystems Inc.
US
I highly recommend to stop using sql queries to clear the caches.
The Rest API are available because they can easily be integrated into any remote management utilities and are a much more convenient way to administrate the system rather than using SMA. In 8.1, SMA is no longer shipped into the distribution. From the landing page, you can easily initiate the REST endpoint call if you open the swagger of the API.
375008155608
US
Every install into an 8.x environment that I have performed has required the truncation of the previously mentioned tables. Until doing so, our custom functions/function libraries are not recognized. I've tried regenerating the libraries and functions (which is successful), as well as cycling the environment with extract file removal, however I still have the issue. I've performed the same imports into our own AWS instances, and it always works as expected. Also, if I private edit the data transform that calls the function, it is able to properly run the rule. The issue seems to be with some level of caching of the calling rules and/or the functions. The API are not completely straightforward, and I've not been able to alleviate the problem by calling any of them. Is this something that anyone else has ran in to? The issue only seems to present itself on pega cloud instances. I have had this issue on all versions of 8.1.x.
Accepted Solution
Pegasystems Inc.
US
Hello Jerome
Thanks for pointing out your problem with Custom Functions (RUFs) not being recognized! Yes, that problem did exist and has been resolved in all current up to date patch releases of Pega 8 Infinity. e.g (8.1.6, 8.2.3, 8.3, etc.)
With that change, I hope that you never have to do those table truncations again
Thanks
Pai G
IN
when I tried to clear the rule cache, it asks for a user name and password what credentials should be give here? which config file can we find this?
375008155608
US
You should be able to pass it your personal operator and password.
Additionally, I've noticed that the /nodes/{nodeID}/caches/conclusion/clear api requires a "source" value. If you want to run this, the source should be "Memory" or "Database". This is not documented anywhere. @pega, it would be great if the api had documentation specifying any other required parameters, or if the admin portal included mini wizards that would auto populate and/or provide dropdowns that prompted valid entries for any required inputs.
-
Chaitanya Chapati Jinath Wijesinghe Girish Doulat Muralidhara Srinivas Yelamanchili
Pai G
IN
I tried using my operator credentials and it returned 401 with no content. Going by the description it means Unauthorized.
Pai G
IN
Can anyone reply to my query please?
Pegasystems Inc.
IN
Hi Manju,
If you want to clear cache then I would suggest you to run purgAssemblyDatabaseCache agent instead.Go to admin studio-->resources-->agents.If you trace this agent ,you will observe that it truncates cache tables.
Thanks,
Abhinav
-
Billy Bao Mukul Mahajan
Pegasystems Inc.
US
Hello Manju
Thanks for the question, but sorry with all the comments on here, I don't know what your original question is?
What caches are you hoping to effect? To be asking this question, you must be suffering from some symptoms
What are the symptoms of your problem?
and what has been tried to alleviate them?
THANKS
Pai G
IN
Hi Eiset,
Basically, I want to know how to clear Rule Cache or Conclusion Cache. I used the API's as mentioned in this article to clear these Cache. The status was showing as 401 which means unauthorized. We use SAML SSO for login. When tried to clear the cache, it prompted for username and password. I entered my credentials which SAML authrorizes duirng login. The status was 401. We have also configured PegaDiagnosticUser account in tomcat-users.xml. I tried with that account as well and status was still showing 401. Please let me know what is the best way to clear the cache when we login with SAML or Kerberos SSO.
Regards,
Manju.
375008155608
US
I've now ran into this issue 5 or 6 times. Usually, I just stumble around flushing caches, manually truncating tables, and cycling until the function library is able to be recognized. Is there some magic that I am missing? This seems to only be an issue upon initial import.
Pegasystems Inc.
IN