Caching on the embedded widget

22 views
Skip to first unread message

Akbar Hossain

unread,
Mar 24, 2010, 4:48:22 PM3/24/10
to FOAF.Vix
Hi,

I was wondering if it is possible for the caching of FOAF files when
displaying the VIX widget to be switched off by the caller?

Thanks

Wojciech Polak

unread,
Mar 24, 2010, 5:37:33 PM3/24/10
to FOAF.Vix
On Mar 24, 9:48 pm, Akbar Hossain <akkiehoss...@googlemail.com> wrote:

> I was wondering if it is possible for the caching of FOAF files when
> displaying the VIX widget to  be switched off by the caller?

Yes, it's possible, but not recommended for the production use.
If you need it for testing purposes (but not *a lot*),
then just add "&nocache=1" to the path:
http://foaf-visualizer.org/embed/widget/?uri=URI&nocache=1

Without caching, FOAF.Vix needs to fetch a remote
URL each time you call it, so the performance drops heavily.

BTW, an important thing:

This won't work as you would expect:
...embed/widget/?uri=http://webid.myxwiki.org/xwiki/bin/view/XWiki/
hjs#me
Instead, call it this way:
...embed/widget/?uri=http://webid.myxwiki.org/xwiki/bin/view/XWiki/
hjs&hash=me

For this particular case, there won't be any difference,
but it might for other. Just convert "#foo" into "&hash=foo".

PS You can also add nocss=1 and specify a custom CSS yourself
or overwrite the default stylesheet.

Regards,
Wojciech

Akbar Hossain

unread,
Mar 25, 2010, 4:49:26 AM3/25/10
to foaf...@googlegroups.com
Hi

Thanks for the tips.

I will make sure we urlencode the webid.

I am wondering if perhaps rather than switching off the cache if we
basically want to allow the user to force a refresh.
So the user interaction is view the widget via the cache and if the
think its out of date a press a refresh now button/link. The link
being on the widget or on the hosting page.

Thoughts?

Thanks

> --
> You received this message because you are subscribed to the Google Groups
> "FOAF.Vix" group.
> To post to this group, send email to foaf...@googlegroups.com.
> To unsubscribe from this group, send email to
> foaf-vix+u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/foaf-vix?hl=en.
>
>

--
Sent from my mobile device

Wojciech Polak

unread,
Mar 25, 2010, 1:04:12 PM3/25/10
to FOAF.Vix
On Mar 25, 9:49 am, Akbar Hossain <akkiehoss...@googlemail.com> wrote:

> I am wondering if perhaps rather than switching off the cache if we
> basically want to allow the user to force a refresh.

Using nocache=1 means also a refresh.

> So the user interaction is view the widget via the cache and if the
> think its out of date a press a refresh now button/link. The link
> being on the widget or on the hosting page.
> Thoughts?

FOAF.Vix's cache lifetime is only 48h. Do you really find it
to be too long? Most FOAFs don't change often so I think it's
okay.

Regards,
Wojciech

Akbar Hossain

unread,
Mar 25, 2010, 1:35:58 PM3/25/10
to foaf...@googlegroups.com
Okay thanks. The issue is that people are editting thier foaf files on
foaf.me on the data tab or with webdav / tabulator. Flick to the me
tab. And think the edit hasnt worked.

I will see what we can do to minimise any nocache usage. We know when
they have editted a profile on foaf.me

Thanks again.

Reply all
Reply to author
Forward
0 new messages