Saturday, April 29, 2017

Working with timezone for events

Every organization hosts various events; be it for their business growth or some internal functions or other reasons and thus, it very common requirement of client to setup event date-time within WebCenter Sites.

If your client is located only in one country, it is quite easy to setup event date-time as event is usually hosted at same geographical location, thus, you would simply create asset type and definition as needed. While displaying event on your site, you can set fixed desired timezone while formatting date-time using dateformat tags or simply using java.

But if you are dealing with multi-lingual international websites and when client wants to host events for their international counterparts also, displaying event on website pages according to user's geo-location can be a challenging and arduous task.

Although there may be many ways to deal with it and can also vary on client's requirement. I would like to present one working solution which we used in one of our project if you also have the following requirements:
  • editors should be able to set event start and end dates as they desire
  • event should be displayed in end-user's date and time according to where they are geographically located
Hence, basically there are 2 challenges for setting up event date along with timezone:
  1. Saving event date-time considering timezone within WCS
  2. Displaying event date and time on webpage according to user's timezone
Saving event datetime considering timezone within WCS
Dealing with timezone in WCS can be difficult for following reasons:
  1. While setting any date and time for a date attribute within WebCenter Sites, by default DatePicker attribute editor is displayed which provides date, time and seconds to set but lacks an option to set timezone. Thus, it is pretty sad that currently there is no out-of-the-box attribute editor available to set timezone along with date and time.
  2. Even if you set timezone as another attribute, still WCS does not consider it (for obvious reasons) and thus, you would end up manipulating the date attribute's value via flex filter or asset listener or other way.
  3. Furthermore, date attributes within WCS are saved according to the timezone of the application server where WCS is installed and thus, even if you manipulate date attribute according to 2nd step, you will face following issue: Lets suppose if your server timezone is set to UTC and one of the editor located in London sets a time 10:00 AM for an event and saves the asset. Event date is first converted to UTC by WCS and saved in database in server timezone i.e. 11:00 AM UTC. Even if the date is saved in UTC, editor sees the date according to his/her timezone set in his/her profile or automatically calculated by WCS and thus, thinks that event date & time is saved correctly. But now when editor from another location say Germany checks the same asset and verifies the event date, he/she sees the converted date according to his/her timezone i.e. 09:00 AM CEST and thinks that wrong event date or time is set by previous editor? Shouldn't it be 10 AM, why I am seeing 09:00 AM CEST ? and thus, German editor may end up editing the asset or will ask London editor to review and correct it but London editor sees the correct date set. Do you see the issue ?
How to deal with above issues in WCS ?
In order to consider timezone for an event, you would have save the event date-time along with timezone. Developing new DatePicker alike attribute editor with timezone option can be more difficult than the following way:
  1. Create 4 attributes for event definition: 2 attributes of type - date and 2 attributes of type - String. For e.g. eventstartdate and eventenddate of type - string and eventfinalstartdate and eventfinalenddate of type - date
  2. Editors will have to enter values in eventstartdate and eventenddate in some pre-defined specified format for e.g. dd-MM-yyyy HH:mm. Format can be decided with client beforehand. Also, you can add some validation on the input using some custom attribute editor. One such attribute editor is REGEX attribute editor.
  3. Editors should also specify timezone for an event via eventtimezone attribute of type - String. You can assign a pulldown attribute editor with pre-defined timezone values or can dynamically create the item list using TimeZone's method: getAvailableIds and populate them in pulldown attribute editor.
  4. When asset is saved, convert the event's start and end dates + eventtimezone into server timezone and save the value in eventfinalstartdate and eventfinalenddate respectively. You can use either flex filter or call element from PostUpdate element. If you are using Asset API to save date attribute, WCS saves date attribute in following format: yyyy-MM-dd HH:mm:ss. Note, if you are using PostUpdate way, then be sure to make eventfinalstartdate and eventfinalenddate as non-editable fields (How to do so? You can customize the element: OpenMarket/Gator/AttributeTypes/DATEPICKER by creating under CustomElements folder; to make date attribute as non-editable)
Thus, by following above steps, what have we achieved?
  1. eventstartdate and eventenddate is displayed same for all editors irrespective of their timezone set in WCS and thus, there is no conflict among editors.
  2. eventfinalstartdate and eventfinalenddate is saved always in server's timezone and importantly, as date attribute, thus, while displaying date on your webpage, always use eventfinalstartdate and eventfinalendtime.
Why are we saving same values 2 times in 2 different attributes? What do we achieve by doing so?
  • firstly, by saving attributes: eventfinalstartdate and eventfinalenddate of type - date, you can build an event search page where you can sort by date attribute easily which may have been difficult with having only string attributes: eventstartdate and eventenddate.
  • second, when displaying event's date-time, developers can use out-of-the-box dateformat tags which accepts date attribute value as input as is from assetset tags output. Furthermore, dateformat:create tag has ability to input timezone also; which is explained in next section.
Displaying event date and time on webpage according to user's geo-location
After saving event datetime according to previous step, as a developer, its already known that event dates are saved in eventfinalstartdate and eventfinalenddate as date attribute and always in server's timezone.
Thus, for displaying event, we need to:
  • find user's timezone
  • convert and display event dates in user's timezone
For finding user's timezone, there can be various ways but eventually you would have to rely on some geo-location services or other known techniques. One of the element within WebCenter Sites calculates timezone for its various core functionalities is OpenMarket/Xcelerate/Util/SetTimeZoneInSession. You can also use the same. Also, one of the popular known service is Maxmind's GeoIP; which provides quite accurate geo-lcation data and examples on finding user's geo-location data in various programming language.
One important note: If you are using WebCenter Sites 12c, GeoIP is already shipped with the product and can be used for finding user's geo-location information. In fact, we are already using GeoIP API in one of our projects running on WCS 12c for displaying personalised content according to user's geo-location.

After finding user's timezone, you can use following sample code to display the event date-time on your website pages:

I hope this post helps many other fellow WCS enthusiasts who are struggling with dates and timezone :)

Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

Thursday, November 10, 2016

Creating System Events

WebCenter Sites provides out-of-the-box utility to create an event which can regularly on the time set. To create an event which works as scheduler basically calls WebCenter Sites managed SiteEntry or Template via entering an entry in "SystemEvents" table in specific format.

When to use SystemEvents?
There can be various scenario to use system events such as:
1. Generating output of daily updates on the certain tables
2. Generating sitemap.xml
3. Call certain services such as creating assets from other systems
4. Call custom search like SOLR search
5. Call list of pages so that event works as crawler on delivery system. For e.g. on publish, pages are flushed, thus, pages are required to generated again. Thus, if those pages are calculated, then can be crawled with SystemEvents too.

There are 2 ways by which you can create SystemEvents: either via ContentServerExplorer/SitesExplorer or via programming

With SitesExplorer, it is very easy. You just need to add an entry within it manually with appropriate values and that's it. But certain clients don't allow access to SitesExplorer or CatalogMover and thus, it is difficult when such events are required. Hence, the need of a program which can create System Events whenever required as shown below:

Following SystemEventsUtility should provide an idea on how to create utility to perform all the tasks related to events: create, enable, disable and destroy.


Information related to the methods are present in Oracle WebCenter Sites Tag library.

Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

Sunday, August 28, 2016

Generating page urls which reflects folder structure

In Oracle WebCenter Sites 11.1.1.8.0 and above, it is very easy to generate vanity urls with help of webroots. With introduction of Vanity URLs concept, editors have control over urls without help of developers once URL Pattern is set and thus, removing the need of developing/updating URL assembler for generating urls. Furthermore, editors have ability to create 301 and 302 redirects as well.
Admin/Developer's Guide details about setup of webroots and URL pattern with examples, hence, it is redundant to explain the same in this post.

Although, there is facility to generate desired short urls, there is one particular case which mostly every client wants to have i.e. to generate urls for page assets that reflects the pages placed in SitePlan tree (/locale/level-1-page/level-2-page/..).
For e.g. Consider FirstSiteII sample site, there are 4 home pages for all each language: en, fr, de, es and there are few pages placed under FSIIHome (en language version of pages), thus, any client will like to have url the following way:

FSIIHome --> /en/home
       FSIIAbout --> /en/home/about-us
       FSIIProducts --> /en/home/products
       .....
Home (es) --> /es/home
Home (fr) --> /fr/home
Home (de) --> /de/home

As Editors keep on adding/editing and updating pages' position in SitePlan, it has become very necessary for clients that pages' URL update automatically. Also, editors mostly desire to decide their own url string, for e.g. for Home (fr), url string would be accueil, thus url should be --> /fr/accueil

Keeping in the mind above requirements, there are 3 easy ways (there can be other ways too) to achieve hierarchical urls for Page assets. First of all, it is very clear that editors want to enter their own url string (page url string which would be part of url); thus, create one attribute which would hold this url string value which editors can edit.

1. URL Assembler: It is widely used by various developers to generate page urls which reflects page path in SitePlan. As this post is about generate vanity urls without use of Assembler, it is out of scope of this post.
A simple idea would be to find page's path in one element and then pass this calculated path as argument to <render:gettemplateurl> tag with inclusion of assembler attribute which would be used to generate urls while assembling. Developer's Guide details on how to generate url assembler and is quite explanatory.

2. Flex Filter: Flex filter can be used for finding page's path and save the path in some custom attribute (say URLPath) so that this custom attribute can be used for defining Page's URL Pattern.  Thus, while creating Page URL Pattern, pattern can be similar to following: ${locale}/${f:spaceToDash(URLPath.toLowerCase())}

Although, it is quite a flexible solution but if any changes are required, have to update and deploy flex filter which may not be desirable in few situations like restarting WebCenter Sites, saving all page assets, etc. Furthermore, I have experienced that updating URLPath attribute's value with page path doesn't always reflect immediately in page's vanity url. Sometimes, its required to edit & save page assets 2 times. I faced this issue in my local 11.1.1.8.0 JSK but may be latest patch includes the fix.

3. Custom Function: All the Functions which are available while defining vanity url pattern are present in OpenMarket/Xcelerate/Util/GetUrlExpressions element. You can update this element and add your own custom function as required and generate vanity url for assets. Please note, functions within this element do not support Asset API or REST API but it does allow use of ICS object. Thus, with this key information, we can use ICS object to call a CSElement which can generate url path string and then, use this calculated url path string to generate hierarchical urls for Pages.

For creating the custom function, just start by creating one CSElement with name: OpenMarket/Xcelerate/Util/GetUrlExpressions and click on Element Tab, automatically existing code should be visible as it should already exist in ElementCatalog. Include the following custom function which accepts id and locale as input and calls a CSElement. This CSElement is responsible for generating url path and set the url path in ics scope to be used by the custom function.

Sample code for finding URL Path (URLString is the page attribute where editors can input desired URL string for the page asset):

And, then just define page vanity url pattern using the above custom function. Add attribute: URLString to all page assets, update values in all Page assets and save. Vanity URLs should be present for all the page assets.

Following snapshots are for FirstSiteII Page URL Pattern as example:

FSIIPageURLPattern
FSII Page Vanity URLs

Thus, by using custom function defined in GetUrlExpressions groovy element and CSElement, one can update business logic as many times required without restarting WebCenter Sites and deployment issues.

CAVEATS:
  • There is no escape from editing and saving children page assets when URLString attribute's value is updated in parent page. For e.g. updating FSIIHome's URLString attribute value from home to fsii-home does updates the vanity url for FSIIHome page from /en/home to /en/fsii-home but does NOT updates the children page's vanity url for e.g for FSIIAbout vanity url from /en/home/about-us to /en/fsii-home/about-us. All the children pages are required to be edited & saved for updating vanity urls. This is where URL Assembler can be helpful if there are many URLString attribute value changes but considering that most companies are very strict about SEO and google page ranking, page urls will not be changed frequently. Also, one can plan to generate vanity urls for Page assets when there is release, thus, it would be only one time edit & save for generating vanity urls for Page assets. Finally, it all falls to business decision.
  • During upgrade or applying patch, one needs to take care that GetUrlExpressions element has your custom function otherwise you many loose all the vanity url for pages and have to generate again.
Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

Sunday, May 1, 2016

Searching Assets in Contributor UI

In Oracle WebCenter Sites, searching assets in Contributor UI is very easy. Simply login, navigate to Contributor UI, enter search term and click on search will list the assets in list mode.

Whenever WCS is installed, global search is already enabled for indexing all available asset types (global indexes may be disabled on WCS delivery installation). Hence, whatever search term is included in Search, assets are returned from fields which are indexed as global indexing (Check here for list of fields which are indexed for global search). This is Simple Search. For e.g. if you search asset by id, then the asset with exact id match and referenced & associated assets are also returned; which may not useful as you want to search asset of a particular id only. Thus, one has to use Advanced Search; wherein inputing id in the Id column will yield only a particular asset search. Details of using Simple Search and Advanced Search is well explained in User Guide, thus, bragging about it in this blog post is useless.

What I mainly want to focus is that how one can optimize the use of search for not only Contributor UI users but for coding your search web pages too.

Optimizing search for Contributor UI users
Most of you might already know this; but still I think it is better to mention this topic - Saved Search.

Saved Searches are best way to search assets and participate in contribution activities for authors and publishers. In my past projects, I have seen admin/developers not mentioning this simple yet powerful utility to Contributor users which is present out-of-the-box for use. Saved searches can be used for various following purposes:
Creating private list of searched assets with following criteria
  • Assets created/edited user X
  • Tags (If a certain task is to be completed by an user; while creating/editing assets, user can simple add one tag within tags attribute and then search assets by tag and save search for future use)
  • Locale
  • Modified date (Custom Range is very useful in certain scenarios)
  • Asset Type + SubType + Attribute Search (Note: for flex attribute search, asset type and corresponding attribute should be selected for indexing. This is very helpful when assets of particular parent are to be searched)
Creating and sharing list of searched assets: One of best feature of Saved Search is that it can be shared with other users of a particular role which can be very useful in many scenarios.
  • One simple use case is to search assets by locale of a particular asset type. It is very easy to search assets by locale for a particular asset type but it is not very easy for other users who don't use advanced search functionality and thus, it becomes difficult for users to search assets by a particular locale. Thus, sharing this simple locale based saved search can be helpful to other contributors. 
  • Shared vs Unshared assets: Consider a global site containing assets, created with dimension - en_Global(Global English) and other site (Germany) which has assets created with 2 different dimensions: en_DE (English) and de_DE(German). Also, assets of en_Global can be shared to and used by Germany site for associations. Most common ask of customers is how to distinguish which assets are shared assets (meaning global English assets) and which assets are local assets (local English assets of Germany site). Thus, searching assets by both locales (en_Global and en_DE) in Contributor UI, saving them as save search and sharing across all contributor UI users can be very helpful; which can ease the process of contribution activity.
There can be various other scenarios where one can make use of save search functionality.

Moving on, following topics are more useful for developers rather than Contributors and are also very useful when it comes to developing search parts of web pages using: Query assets and Content Query assets.

Query assets can be used for searching assets of only one type but its most powerful usage is that one can include any SQL statement to search assets. For e.g. Search AVIArticle articles whose parentid = [ArticleCategory: Baseball articles asset id] simply including the following query can be useful:
SELECT id from AVIArticle, ArticleCategory_Group where AVIArticle.id=ArticleCategory_Group.childid and ArticleCategory_Group.parentid=1327351718484

Furthermore, more complex queries can used for searching assets; just need to take care that "id" column is return in resultset. Query assets are useful when associated to assets via association but can also be useful in Contributor UI if previewed using a template which can lists down the assets found from Query assets.

Content Query assets are used while creating dynamic recommendation. Dynamic Recommendations can use CSElement to search assets but can also use Content Query assets to search assets. Moreover, Content Query provides more flexibility and freedom to Contributor UI users to decide search criteria whereas when assets are searched using CSElement, developers have to update code to meet the flexible search criteria. For e.g. Consider that a website shows 5 latest news on homepage like a ticker display every week or so; contributor users usually create news asset(s) and publish. Normally, developers develop template such that the template which renders news ticker display will fetch by searching against the latest news based on business search criteria and display news. If now, only 3 latest news of a different criteria is required to be shown, developers need to re-code to fulfill these new flexible requirement if the news assets were searched using either dynamic recommendation (via CSElement) or directly being searched in ticker display template. In such scenario, contributors after creating news asset request developers each time whenever different criteria of news are to be shown. But if dynamic recommendation with Content Query asset is used; it will be very easy for Contributor UI users to just edit the Content Query asset according to their criteria and publish the Content Query asset, thus, no need for interaction with developers and ease the process for all.

Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

Saturday, April 23, 2016

Automatic Approval vs Multi-Destination Publishing

After the introduction of WebCenter Sites 11g8 version, Sites provides various improvements from creation of vanity url to proxy-assets to various customization hooks. One of the new customization hook introduced was - RealTime Publishing Customization Hooks which describes on how one can develop a custom solution for multi-destination/multi-target destination publishing. Although official guide provides full detail, I recommend to read this article once.

Thus, there is already an custom solution to:
1. Publish assets simultaneously to multiple destination. Furthermore, publishing to disaster recovery server can also be included.
2. Publish audit trails: Who published what and when
3. Minimize the effort of Contributors and Publishers

In one of my previous blog post - Automatic Approval of assets, I provided a glimpse on how to create a simple custom solution to automatically approve assets wherein administrators have control over setting up time when approval of content should occur which is similar as configuring scheduling publishing. With this approach:
1. Content is approved automatically to targeted destination
2. Admin has choice of selecting which content type (asset type) should be approved
3. Scheduling configuration just like scheduled publishing
4. If proper solution is developed, wherein administrators can easily disable/enable System Events, update asset types required for approval, destinations, scheduling, etc; automatic approval of assets can be helpful in various scenarios.

So, now which one to choose? Automatic approval or Multi-Target Publishing?
I have listed down few points which can help in deciding which mechanism will meet your requirements.

Features Multi-Target PublishingAutomatic Approval
SCHEDULINGAlthough multi-publishing mechanism
provides scheduling; it fails to configure
different time settings for different destinations.
This may be required sometimes when a
piece of content is required to be shown at different times according to timezone and
place; given that
delivery servers are located at different
geographical locations.
As automatic approval event itself is separate event, administrators
can set automatic approval event for different target destination
to different time as needed, furthermore, they can also set scheduling publishing
as required.
EFFORTThis tasks will take only one step i.e. to
build the solution and deploy it,
that's it. Although it is one step process,
if any regular changes required,
it may require many changes within
the solution; including restart of delivery
servers which may not be desirable at all to customers.
Once the automatic approval element is ready which can intake assettypes
and target destination as parameter, it is just matter of adding row in
SystemEvents table. But if there is no way to update SystemEvents table
via SiteExplorer (blocked due to security reasons), developers may need to
build few more custom elements to add/update/delete approval events within
SystemEvents table.
AUDITINGAs already mentioned in developer's guide
and the Oracle PDIT blog,
one can also add methods within same implementation to include
audit trails as required.
This mechanism can be very helpful in maintaining separate approval logs and
publishing logs can be maintained.
NOTIFICATIONSPublishing logs will contain full verbose output.
But only those users with
access to Admin UI can check the status and
output. To access publish
console from Contributor UI, will require another customization which is
aptly described here -
https://blogs.oracle.com/pdit-cas/entry/exposing_the_publish_console_in
Same customization of exposing publishing console can be helpful to
know which assets were published. For approval messages, user can
select the asset and check the status of each assets individually.
CONFIGURATIONAfter custom solution is ready, configuring
multi-target publishing is
very easy. It is the same process as one would configure publishing
destination but with few more arguments.
Configuring automatic approval can be tedious task as admin has to manually
add/update row within SystemEvents table. But if custom solution is developed
for adding/updating rows, then it can become quite easy for administrators to
maintain different approval events.
CAVEATSOne of the major problem with this functionality
 is that it is required to
restart all target servers as there would be
changes made within
AdvPub.xml file, but it is one time process.
But there are other
alternatives one can take like routing the
traffic to other delivery server
until other is restarted or content can be served
from CDNS until all
delivery server(s) is/are up and running.
Another issue is even if any one of the target
server is down, although
assets were published to other running target server(s), assets are
marked as NOT published for all the servers;
whether they were running
or not. Thus, assets will get published again next time
 to all servers which may
degrade performance depending on cache configurations.
One major problem is configuration i.e. adding or updating or deleting entry
in SystemEvents table. But if custom solution is build for configuring automatic
approval, then it is very easy for administrators. Another issue can be as it is
more of custom solution built around WCS elements and not a separate
customization hook, one has to make sure that during upgrade, custom elements
are to be taken care of. Developers need to re-test the functionality again if OOTB
approval element was changed.

So there you have it, all pros and cons of both mechanisms. There is no preferred or superior option to other. One has to weigh both the options according to cache configurations, architecture and of course, customer requirements. Furthermore, both mechanisms can be mixed and used as needed. For e.g. Multi Realtime publishing can be configured for delivery servers whereas test servers can be setup for automatic approval of content + scheduled publishing during no/less editorial activities.

Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

Tuesday, April 12, 2016

Showing alert message to users

WebCenter Sites provides various customization hooks for customizing Contributor UI as mentioned in Developer's guide. But there is no illustration provided on showing custom message(s) to Contributor UI users either via simple alert or floating modal window.

When can custom messages be helpful? 
Few use cases of showing custom message(s) which can be:
1. Showing welcome message
2. Showing message for changing password every 3 months
3. Showing message for upcoming event or scheduled maintenance period

As WebCenter Sites provides customizing Contributor UI via SiteConfigHtml element, it is very easy to create alert messages.

Simple welcome message can developed by creating CustomElements/UI/Config/SiteConfigHtml element using either Admin UI or Sites Explorer. Add the following code within SiteConfingHtml.jsp as shown below:

Now whenever any user logins to WebCenter Sites Contribution UI, welcome message is visible as shown below for fwadmin.
Welcome message!!


























Above example is very simple one. In order to show message like scheduled maintenance, password change alert, deadline of a task to particular user or other important messages; one can simply make Ajax call to certain WebCenter Sites element and show corresponding results from the element in the alert message.

For e.g. Consider showing same welcome message via an element rather than defining within SiteConfigHtml.jsp.

1. Create a CSElement and add the code: Welcome <ics:getssvar name="username"/>! between opening and closing tag of <cs:ftcs>
2. Create a SiteEntry and associate the above CSElement (Wrapper=NO; pagelet=NO; uncached)
3. Make Ajax call from SiteConfigHtml.jsp to call the above SiteEntry and show the message only after Contributor UI is loaded. Add the following code within SiteConfigHtml.jsp:

Output should be same. Thus, it is very easy to create alert messages within Contributor UI which can be very useful sometimes when combined with other functionalities like system events, publishing, asset operations, etc.

Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

Tuesday, March 15, 2016

Deleting and regenerating cache

Caching is a very important aspect in Oracle WebCenter Sites and nearly all projects depend mostly on strong project design and optimal caching strategy (Note: Caching strategy also considers how your pages are coded). There is no use in going through various caching levels as they are aptly discussed in official document and in Oracle A-Team articles.

Before going through this post, I highly recommend to read about caching and different caches used within WebCenter Sites. This post is more helpful to those people who usually deal with resolving cache related issues.

What I want to highlight in this post is:
1. How to purge all cache?
2. How to re-generate all cache after all cache are purged?

One would ask why to delete all cache?
One of the important task while troubleshooting performance of a webpages is to calculate the number of cache objects generated, then by removing all the cache, hit a certain page(s) and find number of cache objects and dependencies generated for that/those page(s) using Support Tools or Admin UI. This task should generally carried out in Test environment or JSK. Thus, when it required to troubleshoot performance of webpages for full site(s), one can know by number of cache object generated for page(s) by flushing all the cache, make the changes within template or update cache settings and then re-generate all cache objects by hitting all the webpage urls.

How to purge all cache?
To purge all cache, one needs to know what kind of cache is enabled within your project i.e. incache (ehcache) or traditional cache (Only one of them is enabled). Incache is enabled by default within WebCenter Sites installation. Only old version of Oracle WebCenter Sites a.k.a FatWire 7.6 and before uses traditional cache but also has option to enable incache.

For deleting incache where WebCenter Sites is installed - Login to WebCenter Sites > Admin UI > Admin Tab > Expand System Tools Node > Cache Management > double click on Summary tab under CS Cache and Co-Res SS Cache separately. Select all checkboxs for flush cache and click "Flush Cache"
For deleting incache from Remote Satellite Server (RSS) - You can perform the same above step but using the following url:
http://[host]:[port]/[context]/Inventory?username=SatelliteServer&password=[password]

For deleting traditional cache, hit the following url:
http://[ip]:[port]/[context]/CacheServer?all=true&authusername=fwadmin&authpassword=[password]

One can use Support Tools to delete cache.

Furthermore, if you want to delete all incache forcefully, then you can find the location where cs-cache, ss-cache and linked-cache are stored from cs-cache.xml, ss-cache.xml and linked-cache.xml files respectively, which are located under [webapps]/cs/WEB-INF/classes folder and then delete everything under the respective folders. This task is to be performed after WebCenter Sites is shutdown.

How to re-generate all cache after all cache are purged?
Deleting cache is easy task but major problem is generating cache. A website can have hundreds to thousands of webpages and it is very arduous task to hit each webpage url one by one to generate cache. Also, WebCenter Sites does not provide any tool which can crawl through all the page urls. But there are various sites or tools available online which can do the task of crawling of all the webpages. One of the tools which I use and like is flem firefox add-on. It has ability to intake urls from clipboard memory and crawl through them as slideshow. It also has settings to set page load time interval and is very easy to use.

For using flex firefox add-on, basically one would need to first list down all webpage urls of site(s) and just copy & paste to flem add-on and run the slideshow.
If vanity url is configured for a site, then it is very easy to list all urls using the following query:
SELECT 'http://[ip]:[port]/[context]/' || webroot || '/' || webreferenceurl FROM WebReferences

Disclaimer: The code and/or the configurations posted are not official recommendations and should be used at sole's discretion with proper testing before deploying on live WebCenter Sites systems. Cheers!!

A simple code compare functionality

One of the most important aspect of any development cycle is deployment and while deployment, it is very important to note the changes don...