Hopefully silly Descriptor question...

16 views
Skip to first unread message

Andrew Bayer

unread,
Mar 16, 2016, 6:18:58 PM3/16/16
to jenkin...@googlegroups.com
If I've got multiple implementations of an extension point, can I still have just one Descriptor for the abstract class they're inheriting from? I ask 'cos I need to keep some transient data there on startup (parsed Pipeline scripts contributed by other plugins) that I don't want to have to reload/reparsed every time they're referenced, so I'd like to cache the resulting data for a given implementation once I've asked for it. The actual mechanisms of this, I get, but I'm legitimately not sure *where* to put that transient map to cache this stuff.

Halp?

A.

Jesse Glick

unread,
Mar 16, 2016, 7:29:30 PM3/16/16
to Jenkins Dev
On Wed, Mar 16, 2016 at 6:18 PM, Andrew Bayer <andrew...@gmail.com> wrote:
> If I've got multiple implementations of an extension point, can I still have
> just one Descriptor for the abstract class they're inheriting from?

No.

> I'd like to cache the
> resulting data for a given implementation once I've asked for it. The actual
> mechanisms of this, I get, but I'm legitimately not sure *where* to put that
> transient map to cache this stuff.

An instance field of any extension you like.

Andrew Bayer

unread,
Mar 16, 2016, 7:33:13 PM3/16/16
to jenkin...@googlegroups.com
Okiedokie


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1L7atxfA8NQxLDVP6GXng6KtGBN6a5h9QzGj0MohB%3DpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages