Print

Print


Hi Loriano,

On 6/1/18 2:49 AM, Loriano Storchi wrote:
> Dear All,
>     I would like to start testing a cache decision plugin, the question
> is, apart for the xrootd code itself, is there some basic
> documentation explaining how to implement such a plugin ? Or, even
> better maybe,  is there some basic source code to start playing with ?

There are two simple examples in the xrootd repo:
https://github.com/xrootd/xrootd/blob/master/src/XrdFileCache/XrdFileCacheAllowDecision.cc
https://github.com/xrootd/xrootd/blob/master/src/XrdFileCache/XrdFileCacheBlacklistDecision.cc

A more complex, real world example one would be this:
  https://github.com/osschar/xrdpfc-decision-ucsd
This might even do what you need already as you pass regexps for do-cache and do-not-cache.

In short, there is nothing special, you just, you just subclass XrdFileCache::Decision, implement virtuals ConfigDecision() (if you want to parse configuration) and Decide().

Best,
Matevz

> Thanks
> Loriano
> 
> --------------------------------------
> Loriano Storchi, PhD
> e-mail: [log in to unmask]
> http://www.storchi.org/
> 
> [log in to unmask]
> [log in to unmask]
> [log in to unmask]
> [log in to unmask]
> [log in to unmask]
> 
> skype: redols
> Phone: +39 0871 355 4606
> 
> GnuPG Key ID: F20D8184
> Fingerprint = 0x0249EB7F7C2A6C123ED9D0F1E5385D42F20D8184
> 
> ########################################################################
> Use REPLY-ALL to reply to list
> 
> To unsubscribe from the XROOTD-L list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1
> 

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1