On Thu, Mar 20, 2014 at 7:37 PM, Patrick Lauber <
di...@treepy.com> wrote:
> <snip />
>>
>> Can't we change anything in the template tag where depending on
>> request URI we decide whether to output a URI that would output only
>> the URI to the detailed output or the detail output itself? Since
>> placeholders have a unique ID could we do something like -
>> {page-uri} # Provide the ESI tag with the following URI
>> {page-uri}?placeholder={placeholder-id} # Provide the output for the placeholder
>
> One problem you will face is that plugins can insert css and js files into the head depending if they are there or not.
> So the head will be a combination of js and css files from ALL the placeholders of the page.
> They also can react to the context of the template they are in. So if you want to render only one placeholder you would need
> to capture the context they are in somehow.
> We already cache the placeholders and their JS and CSS output to head. And only if a plugin changes do we rerender
> the whole placeholder. Maybe some of that functionality could be reused.
>
Yes it is true that plugins may add CSS and JS and that is in fact one
thing I found problematic since multiple instance of the plugin within
or across placeholders cause the JS and CSS to be added multiple times
to the <HEAD> element. I personally did not like it and would prefer
plugins' to document the JS/CSS they would want included in the <HEAD>
in documentation over including them in the template.
So I would not worry about that for this/our use case in particular
but in general this would be needed to be added as a "things to note".
> Just for clarification. In 3.0 for not logged in users there will be only 2 calls to memcache after a page is cached. No db queries and we measured about 20-40ms response times.
> A plugin can define if it is dynamic and can bust the placeholder and page cache.
This is actually a very good example you bring up; what we are trying
to develop is a sport aggregation website (and hope to re-use most of
it across different sports) where we will host sports specific blogs,
match results summaries, player statistics, videos, presentations of
plays, coaching materials etc. The hope page will comprise of Slide
Show of images from recent matches, player statistics (computed), team
statistics (computed), Events calendar, Editor's Pick of - plays,
blogs, matches etc.
Now lets consider we updated a match result which would only impact
the recent matches area, e.g., that placeholder would be 10~15% of
pages data; now the plugin basically depends on a model 'Match' so
when that cases we will look up for all instances of MatchPlugin,
RecentMatchesPlugin etc. associated with the 'Match' updated and PURGE
them from cache; now if we are to purge all the pages instead of the
plugin instances effected only, that would cause much larger amount of
data getting purged unnecessarily; similar would be the case for
player statistics.
So partial content purging would enable us (and the community) to
benefit from purging only what changed and leaving the rest unchanged.
>
> What kind of application/website are you guys planning?
>
As mentioned above we are looking to come with a set of websites for
different sports community and generate content community specific for
non-profit purpose. We also intend to extend it for some other social
cause. In addition I come from a CMS background for news industry am
trying to learn a new CMS to explore its strong points and to be
honest Kudos to the team for such a wonderful product/project; I am
really liking it. We are also evaluating it as a platform (among other
CMSs) for mult-site hosting solution that is community driven.
In fact describing the above scenario I am even more convinced
Varnish/ESI and Django CMS would be a extremely benevolent combo. If
you feel that the community will benefit in general I am more than
inclined to chip in with the time for developing, testing and using it
:).
>> <snip />
Thank you,