ANN: kss.plugin.cacheability

4 messages Options
Embed this post
Permalink
Balazs Ree

ANN: kss.plugin.cacheability

Reply Threaded More More options
Print post
Permalink

kss.plugin.cacheability is a transitional package that brings you
cacheable KSS requests for version 1.4 and trunk, today.

The work was fully sponsored by Zest Software.

Cacheability allows you to use GET KSS requests, instead of the POST
request, that KSS currently uses.

GET requests in KSS are planned and hopefully arrive in the next
major version. Meanwhile this package provides transitional access to
this feature.

The plugin javascript uses some unpublished parts of the KSS core. We
will need to provide a clean API as well, for similar tasks in the next
version. So the plugin code should not be considered as an example, but I
encourage its usage. I will provide an upgrade path, once the feature
lands in KSS.

To summarize the main usage, you can make a server action as GET request
this way:

    css:event {
        action-client: cacheability-serverAction;
        cacheability-serverAction-url: actionName;
    }

The future syntax for this will be (once it lands in trunk):

    css:event {
        action-server: actionName method(GET);
    }


POST records will always stay the default method in KSS, as the GET
method you must only use with such server actions that are guaranteed to
make no changes to the content.

Enjoy! Please report any problems or feel free to propose enhancements.

Thanks to Zest for sponsorship.

--
Balazs Ree


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Balazs Ree

Re: ANN: kss.plugin.cacheability

Reply Threaded More More options
Print post
Permalink

Some important information that was left out.


Project page:
    https://launchpad.net/kss.plugin.cacheability

svn:
    https://svn.plone.org/svn/collective/plonekss/kss.plugin.cacheability/trunk
         
bzr (readonly):
    lp:~kissbooth/kss.plugin.cacheability/collective-trunk



--
Balazs Ree


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Wichert Akkerman

Re: ANN: kss.plugin.cacheability

Reply Threaded More More options
Print post
Permalink
In reply to this post by Balazs Ree
Previously Balazs Ree wrote:

>
> kss.plugin.cacheability is a transitional package that brings you
> cacheable KSS requests for version 1.4 and trunk, today.
>
> The work was fully sponsored by Zest Software.
>
> Cacheability allows you to use GET KSS requests, instead of the POST
> request, that KSS currently uses.
>
> GET requests in KSS are planned and hopefully arrive in the next
> major version. Meanwhile this package provides transitional access to
> this feature.
>
> The plugin javascript uses some unpublished parts of the KSS core. We
> will need to provide a clean API as well, for similar tasks in the next
> version. So the plugin code should not be considered as an example, but I
> encourage its usage. I will provide an upgrade path, once the feature
> lands in KSS.
>
> To summarize the main usage, you can make a server action as GET request
> this way:
>
>     css:event {
>         action-client: cacheability-serverAction;
>         cacheability-serverAction-url: actionName;
>     }
>
> The future syntax for this will be (once it lands in trunk):
>
>     css:event {
>         action-server: actionName method(GET);
>     }
>
>
> POST records will always stay the default method in KSS, as the GET
> method you must only use with such server actions that are guaranteed to
> make no changes to the content.

This begs the interesting question: what infrastructure is there to
control caching (Cache-Control, Expires, IMS-request, E-Tags,
purges) for those requests?

Wichert.

--
Wichert Akkerman <[hidden email]>    It is simple to make things.
http://www.wiggy.net/                   It is hard to make things simple.

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Balazs Ree

Re: ANN: kss.plugin.cacheability

Reply Threaded More More options
Print post
Permalink
On Wed, 02 Jul 2008 23:32:20 +0200, Wichert Akkerman wrote:
>
> This begs the interesting question: what infrastructure is there to
> control caching (Cache-Control, Expires, IMS-request, E-Tags, purges)
> for those requests?

Yes. The current solution provides the GET requests but it does not do
much more atm. As I am not too familiar with cache control and cachefu, I
count on your and others' help on this issue. I believe the cache control
for the KSS requests should be done in the same way as for the normal
pages.

If this means we need to add extra headers to the dynamic request, there
is a possibility to do that from javascript. Afaik, the browser already
puts headers there, for example, the request has the cookies of the
original page request, which makes authentication work. But we have to
check if we need to modify anything on the request.

Best wishes,

--
Balazs Ree


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers