Cache Inspector not working on Xanadu

Moritz Becker1
Tera Contributor

We are facing an issue using the cache inspector V2 (cache_inspector.do) for development purposes.

 

Opening it just reveals an empty cache inspector with no entries.

 

This looks like an issue with the sandboxing feature (affecting the script include global.CacheInspectAjax).

We cannot validate this thesis because the script include is not viewable or god forbid editable because of the protection policy (Protected).

 

Thus without a maint user, inspecting this record is not possible.

It's pretty hard to develop anything that is cache sensitive without the inspector...

 

So if anybody with access to a maint user would mind checking this thesis... Would be awesome.
Best regards

1 REPLY 1

Sebastian R_
Kilo Sage

For protected global scripts you can use the workaround to remove the protection policy while inserting the record as a new one.

// CacheInspectAjax
var gr = new GlideRecord('sys_script_include');
gr.get('5e0fc3570a0a0ba700fa6a429d1bc10c');
gr.sys_policy = '';
gr.insert();

In the new script you can see the following. You can comment out the first two lines.

process: function() {
		if (!gs.hasRole('maint'))
			return;

		if (this.getChars() == "list")
			this._generateList();
		else if (this.getChars() == "get")
			this._getData();
		else if (this.getChars() == "count")
			this._getSize();
	}

With this cache_inspect.do is working for me (although you know have two script includes with the same name). Alternative is to reinvent the logic based on the script include logic