Skip to content

Commit

Permalink
Merge pull request #1 from intron/master
Browse files Browse the repository at this point in the history
fix typos in README.md
  • Loading branch information
Sebastien Bernard committed Feb 12, 2015
2 parents 104ee6f + 269f543 commit 0bb9c30
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

## Description

This bundle provide a "ready to use" OSGI connector for the new Akamai CCU REST API. This connector has been written in groovy using the http-builder framework.
It is design to enable cache invalidation for AEM/CQ CMS when assets get invalidated. It can be easily configured with your own credentials
and settings. The connector provide all services that you can request via the REST API like getPurgeStatus(), getQueueStatus() and the most important purge().
This bundle provides a "ready to use" OSGI connector for the new Akamai CCU REST API. This connector has been written in groovy using the http-builder framework.
It is designed to enable cache invalidation for AEM/CQ CMS when assets get invalidated. It can be easily configured with your own credentials
and settings. The connector provides all services that you can request via the REST API like getPurgeStatus(), getQueueStatus(), and the most important purge().

The bundle is made to be as light as possible and can be installed just by itself. You will need groovy-all to be installed along with some others bundle like
The bundle is made to be as light as possible and can be installed just by itself. You will need groovy-all to be installed along with some others bundles like
httpclient, commons-collections, commons-lang ... but they usually are already there.

## Implementation

They are three major classes that manage the invalidation :
There are three major classes that manage the invalidation :

- CcuManager is the interface of the connector itself that manage a pool of connections to request the Akamai CCU REST services. It offers simple method's signature with predefined default values
to invalidate cached objects. You can invalidate by CP code or ARL depending of your strategy. This class doesn't do any processing on the urls that you pass to it. It just make
sure that the list contains only unique values and add them to the invalidate caching request.
- CcuManager is the interface of the connector itself that manages a pool of connections to request the Akamai CCU REST services. It offers a simple method's signature with predefined default values
to invalidate cached objects. You can invalidate by CP code or ARL depending on your strategy. This class doesn't do any processing on the urls that you pass to it. It just makes
sure that the list contains only unique values and adds them to the invalidate caching request.

```groovy
def response = ccuManager.purgeByUrls(["http://www.mysite.com/test", "http://www.mysite.com/test2"])
Expand All @@ -25,18 +25,18 @@ def response = ccuManager.purge(["http://www.mysite.com/test", "http://www.mysit

The minimum configuration needed for that service are your Akamai credentials : "userName" and "password".

- AkamaiEventHandler is an event handler that listen to com/day/cq/replication by default and just add a job to a dedicated queue ("com/velir/aem/akamai/ccu/impl/FlushAkamaiItemsJob")
if the path to invalidate start by one of the values specified in the list "pathsHandled" (By default it is /content/dam).
- AkamaiEventHandler is an event handler that listens to com/day/cq/replication by default and just adds a job to a dedicated queue ("com/velir/aem/akamai/ccu/impl/FlushAkamaiItemsJob")
if the path to invalidate begins with one of the values specified in the list "pathsHandled" (By default it is /content/dam).

- FlushAkamaiItemsJob is the job that listen to the queue "com/velir/aem/akamai/ccu/impl/FlushAkamaiItemsJob" and call the CCuManager.purgeByUrls(...) with the list of path to
- FlushAkamaiItemsJob is the job that listens to the queue "com/velir/aem/akamai/ccu/impl/FlushAkamaiItemsJob" and calls the CCuManager.purgeByUrls(...) with the list of paths to
invalidate. These paths are prepended by the rootUrl that represent the scheme + the domain without / at the end.
ex: rootSiteUrl = "http://www.velir.com" and url = "/test" => The path to invalidate will be "http://www.velir.com/test"

You don't have to use the all thing you could easily just use the CCuManager to invalidate your cache without using the listener.
You don't have to use the whole thing -- you could easily just use the CCuManager to invalidate your cache without using the listener.

## Configuration

Each of these classes can be configured to fit you need and your akamai credential. In your JCR repository under /apps/your_app/config.author/ you can add the following configuration files:
Each of these classes can be configured to fit you need and your Akamai credentials. In your JCR repository under /apps/your_app/config.author/ you can add the following configuration files:

- CcuManagerImpl: *com.velir.aem.akamai.ccu.impl.CcuManagerImpl.xml*

Expand All @@ -50,7 +50,7 @@ Each of these classes can be configured to fit you need and your akamai credenti
defaultPurgeAction="remove"
defaultPurgeDomain="production"/>
```
userName/password: The credentials that you use to connect to the akamai control website.
userName/password: The credentials that you use to connect to the Akamai control website.

defaultPurgeAction : The default purge if not specified.
- remove: (default) Remove the asset from the edge server and force the next request to the asset to reach the origin.
Expand All @@ -69,7 +69,7 @@ defaultPurgeDomain : The default domain if not specified.
pathsHandled="[/content/dam]"/>
```

pathsHandled: Comma separated list of paths that can be invalidate.
pathsHandled: Comma separated list of paths that can be invalidated.

- FlushAkamaiItemsJob: com.velir.aem.akamai.ccu.impl.FlushAkamaiItemsJob.xml

Expand All @@ -84,7 +84,7 @@ rootSiteUrl: The root site url that is prepended to the path being invalidated.

## Who are we

Velir is Web Agency that provide a large scale of expertise in user experience design, content management, and marketing platform integrations. Our clients partner with us
Velir is a Web Agency that provides a large scale of expertise in user experience design, content management, and marketing platform integrations. Our clients partner with us
to develop and implement websites and applications powered by Sitecore and AEM/Adobe CQ. More on www.velir.com

## License
Expand All @@ -93,4 +93,4 @@ This project is open source under MIT License.

## More information

If you want to learn more about the CCU REST API: https://api.ccu.akamai.com/ccu/v2/docs/index.html
If you want to learn more about the CCU REST API: https://api.ccu.akamai.com/ccu/v2/docs/index.html

0 comments on commit 0bb9c30

Please sign in to comment.