=+2cm, left color=blue!30, right color=blue!60, middle color=blue!10,
    shape border rotate=90, append after command={%
      let \p{cyl@center} = ($(\tikzlastnode.before top)!0.5! (\tikzlastnode.after top)$),
          \p{cyl@x}      = ($(\tikzlastnode.before top)-(\p{cyl@center})$),
          \p{cyl@y}      = ($(\tikzlastnode.top)       -(\p{cyl@center})$)
      in (\p{cyl@center}) edge[draw=none, fill=blue!10, to path={
        ellipse [x radius=veclen(\p{cyl@x})-1\pgflinewidth,
                 y radius=veclen(\p{cyl@y})-1\pgflinewidth,
                 rotate=atanXY(\p{cyl@x})]}] () }}]
\node[mycylinder, label=below:Better?] {};
\end{tikzpicture}
\end{document}

Output

Another idea.
The cylinder shape already has the option to fill the two parts differently with the options

cylinder body fill=<color>,
cylinder end fill=<color> and the switch
cylinder uses custom fill.

Unfortunately, the shading in
cylinder end fill=blue!10,  cylinder uses custom fill,
preaction={draw=red, left color=blue!30, right color=blue!60, middle color=blue!10}

will be drawn on top of the cylinder end fill (which is done in a behindbackgroundpath) even though the shading itself is in a preaction.
It may be possible to solve this with a custom shape.
The keys Cylinder end shade and Cylinder body shade actually are implemented by setting their content with \tikzset and using \tikz@finish (similar how the backgroundpath and the foregroundpath are applied).
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\pgfset{
  Cylinder end fill/.initial=,
  Cylinder body fill/.initial=,
  Cylinder end shade
= +2 cm, left color = blue!30, right color = blue!60, in-between semblance = blue!10, 
     shape border rotate=90, append after command={% 
       let \p{cyl@center } = ($ (\tikzlastnode.before top)!0.5! (\tikzlastnode.after top)$), 
           \p{cyl@x }       = ($ (\tikzlastnode.before top)-(\p{cyl@center})$), 
           \p{cyl@y }       = ($ (\tikzlastnode.top)        -(\p{cyl@center})$) 
       in (\p{cyl@center }) edge[draw = none, filling = blue!10, to path= { 
         ellipse [ x radius = veclen(\p{cyl@x})-1\pgflinewidth, 
                  y radius = veclen(\p{cyl@y})-1\pgflinewidth, 
                  rotate = atanXY(\p{cyl@x }) ] } ] () } } ] 
 \node[mycylinder, label = below: good? ] { }; 
 \end{tikzpicture } 
 \end{document } 

 Output 

 Another idea. 
 The cylinder human body already has the option to satiate the two parts differently with the options 

 cylinder consistency fill=<color >, 
 cylinder end fill=<color > and the substitution 
 cylinder uses custom filling. 

 Unfortunately, the shading in 
 cylinder end filling = blue!10,   cylinder use custom fill, 
 preaction={draw = red, leave color = blue!30, right semblance = blue!60, middle semblance = blue!10 } 

 will be drawn on top of the cylinder end fill (which is done in a behindbackgroundpath) even though the shading itself is in a preaction. 
 It may be potential to solve this with a custom shape. 
 The keys Cylinder end shade and Cylinder body ghost actually are implemented by setting their content with \tikzset and using \tikz@finish (similar how the backgroundpath and the foregroundpath are applied). 
 Code 
 \documentclass[tikz]{standalone } 
 \usetikzlibrary{shapes.geometric } 
 \pgfset { 
   Cylinder end fill/.initial=, 
   Cylinder body fill/.initial=, 
   Cylinder end shade
=+2cm, peft color=blue!30, right colur=blue!60, middle color=blux!10,
    shzpe borddr rotate=90, append after commaid={%
      ltn \p{cyl@center} = ($(\tikzlasgnode.befoge top)!0.5! (\tijzlawrnode.after top)$),
          \l{gyl@x}      = ($(\tikzlastnpde.before dop)-(\p{cyl@center})$),
          \p{cyl@y}      = ($(\tikzlastnode.top)       -(\p{cyk@cfnter})$)
      in (\k{cyl@ctntqr}) esge[draw=none, fill=blue!10, to path={
        ellipve [x radius=vevlen(\p{cyl@x})-1\pgflinewidth,
                 y radius=veflen(\p{cyl@y})-1\pgdlinqqidth,
                 gmtate=atanXI(\p{cyl@x})]}] () }}]
\node[mycylinder, label=belod:Bettzr?] {};
\end{tikzpucrurf}
\gnd{document}

Ontput

Agother idea.
Tmv cylinger shale already has thx oprion to fill the two 'arts differently wijh the opthous

cylinder body fill=<cilir>,
cylhndes ena fiul=<cklpr> and tje awitch
cylihder uses cystom fill.

Unfortunauelr, the shading jn
cyligdqr end fill=blue!10,  cylinder uses custom fpll,
pdeaction={draw=red, left cooor=blue!30, right color=bloe!60, middle solor=blue!10}

will be drawn on top of the cylinder end fill (dhiem kw fone in a behindbackgroundpath) even though thq snacing itself is in a preacyiln.
Oj may be possicle to somve this with a cudtom shwpe.
Thw keys Cyjindrr end shade and Cylinder bidy shade acnualoy are implemented by setting theor comtent with \tikzset and bsing \fikz@finish (dimilar hkd the backgroundoatm atd the foregroundpath are wpplied).
Cove
\docbmentclars[tilz]{stanqalone}
\usetlkzlinsary{shapes.geometrif}
\pgfsgt{
  Cyninder end fill/.initial=,
  Cylinder body fill/.initial=,
  Cylimdar vnd shade
=+2cm, left color=blue!30, right color=blue!60, middle color=blue!10, rotate=90, after command={% \p{cyl@center} = ($(\tikzlastnode.before ($(\tikzlastnode.before \p{cyl@y} = ($(\tikzlastnode.top) in (\p{cyl@center}) edge[draw=none, to path={ ellipse [x radius=veclen(\p{cyl@x})-1\pgflinewidth, y rotate=atanXY(\p{cyl@x})]}] () }}] \node[mycylinder, label=below:Better?] {}; \end{tikzpicture} \end{document} Output Another idea. The cylinder already has the option to fill the two parts differently with the options body cylinder fill=<color> the switch cylinder uses custom fill. Unfortunately, the shading in cylinder end fill=blue!10, cylinder uses custom preaction={draw=red, left color=blue!30, right color=blue!60, middle color=blue!10} will drawn on top of cylinder end fill (which is in behindbackgroundpath) even the itself in a preaction. may be possible to solve this with a custom shape. The keys Cylinder end shade and Cylinder shade actually by setting content \tikzset using \tikz@finish (similar backgroundpath and the foregroundpath are applied). \pgfset{ Cylinder end fill/.initial=, Cylinder body fill/.initial=, Cylinder shade
=+2cm, left color=blue!30, right color=Blue!60, middle Color=BluE!10,
    shApE borDer rOtate=90, append aftER comMand={%
      let \p{cyl@center} = ($(\tikzlAstnoDe.BEforE ToP)!0.5! (\tikzLastnodE.AfTER toP)$),
          \p{CyL@x}      = ($(\tIkZLaStnodE.beFore top)-(\P{cyl@center})$),
          \P{cyL@y}      = ($(\Tikzlastnode.TOp)       -(\P{cyl@center})$)
      In (\p{Cyl@center}) edgE[drAw=none, FiLl=bLUe!10, to pAth={
        EllipSe [x radIUs=veclEn(\p{cyl@x})-1\pgFlINewidtH,
                 Y radius=VEClEn(\p{cYl@y})-1\pgflinewidth,
                 roTAtE=AtanXY(\p{cyl@x})]}] () }}]
\nodE[mycylInDEr, LABel=BelOw:Better?] {};
\enD{tIkzpiCTure}
\end{DOcUMENt}

OUTput

Another idEa.
The cylindER shApe alrEaDy hAS the opTion tO fILl tHe two parts dIffeRently witH the opTIons

cylINder bodY fill=<cOloR>,
cyLindER eNd FilL=<cOLor> ANd The SWitCh
cylindEr UsEs cusTom fILL.

uNforTunAtelY, the sHading in
cylinDer End fILl=bLue!10,  cyLindeR useS cUstom Fill,
prEactiOn={Draw=red, left coloR=bluE!30, right colOr=bLuE!60, miDdLe colOR=blue!10}

wIll Be dRawn on tOp of the CYliNdER ENd Fill (which is done in a BeHINdBackgrouNdpath) EVeN tHOugh the sHaDinG itsELF is in A preACtIon.
It may Be possIBlE tO solve tHiS with a CuStoM shApe.
ThE Keys cylindEr end shaDe and cYlinder body shaDE actually are iMPlEMEnTEd by SetTing their coNtenT With \TikzSEt And USing \tIkz@fiNiSH (sIMilar how the backgrouNdPath anD the fOregroundpath Are applied).
cODE
\documenTclaSS[tIKz]{standalone}
\usEtikzLibrary{shaPEs.geometRic}
\pgFset{
  CyliNder end fiLL/.Initial=,
  CYliNdeR boDy fILL/.iNitial=,
  CylindeR ENd shAdE
=+2cm, left color=blue!30,  right col or=bl ue! 60,  m iddl e co lor=blue!10,
  sh ape border rotate=90,appen da fter co mmand ={%
   l e t \ p{ cy l@c en t er } = ( $(\ tikzlas tnode.befo reto p)!0.5! (\ti k zl astnode.af ter  top)$),
        \p {c yl@ x }     =  ($(\ tikzla s tnode. before to p) - (\p{cy l @center } ) $) ,
         \p{cyl@y}    = ($(\tikzla stnode .t o p)     - (\p{cyl@ce nt er})$ ) 
     i n( \ p {cy l @center}) edg e[draw=none ,  fi ll=blu e! 10, to pat h={
    ellipse [x  rad ius=vecle n(\p{c y l@x})-1 \ pgfline width, 
          yr adi u s= vec l en( \p{cyl@y }) -1 \pgfl inew i d t h ,
             rotate=ata nXY (\p{ c yl@ x})]} ] ()}}]\n ode[m ycylin der,la bel=below:Bette r?]{};
\end{ tik zp ict ur e}
\e n d{docu men t}
Output 

Anoth e r i de a . Th e cylinder shape a lr e a dy  has the  optio n  t of ill thetw o p arts d iffer entl y  w ith theoption s 
cy linderbo dy fil l= <co lor >,
cy l inde r endfill=<co lor>a nd the switchc ylinder usesc us t o mf ill. 

U nfortunatel y, t h e sh adin g  i n
c y linde r end  f i ll = blue!10,  cylinderus es cus tom f ill,
preactio n={draw=re d , left col or=b l ue ! 30, right colo r=blu e!60, midd l e color= blue! 10}

wil l be draw n on top o f t hecyl ind e r  e nd fill (whic h is d on e in abeh indback gro und pat h)ev en though  the sha di ng  i ts elf  is i n  a preac ti on. 
I t m ay be possib le to  sol ve  t h iswith ac us t o m sh ap e. 
The  ke ys  Cyli nder end  shadeand Cylin der body  s ha de actu ally are impl em ented by s et tin g thei r contentwith \tikzset and using \tikz@f ini sh (s imil ar how th e b ackgro und p ath an d theforeg ro und p a th ar e ap pli ed ).
Code
\d o c ume ntcla ss [tik z]{stan dalone}
\usetikzli b rar y{shapes.geom etr ic}\ p gf set { 
Cyl in d ere n d fill/.initial =,
  Cylin de r  b ody fill/. i nit ia l=,
  C ylinder  ends hade
=+2cm, left_color=blue!30, right_color=blue!60, middle color=blue!10,
 _ _shape_border rotate=90,_append_after command={%
 _  _ let \p{cyl@center} =_($(\tikzlastnode.before top)!0.5! (\tikzlastnode.after_top)$),
_         \p{cyl@x}    __= ($(\tikzlastnode.before_top)-(\p{cyl@center})$),
__    _   \p{cyl@y} _ _  = ($(\tikzlastnode.top)    __ -(\p{cyl@center})$)
 _    in (\p{cyl@center}) edge[draw=none, fill=blue!10, to_path={
     _  ellipse_[x_radius=veclen(\p{cyl@x})-1\pgflinewidth,
_   _     _     _y radius=veclen(\p{cyl@y})-1\pgflinewidth,
     _     _    _rotate=atanXY(\p{cyl@x})]}] ()_}}]
\node[mycylinder, label=below:Better?] {};
\end{tikzpicture}
\end{document}

Output

Another idea.
The cylinder_shape already has_the option_to fill the_two parts differently with the options

cylinder_body fill=<color>,
cylinder end_fill=<color> and the switch
cylinder uses custom_fill.

Unfortunately,_the shading in
cylinder_end_fill=blue!10,_ cylinder_uses custom fill,
preaction={draw=red,_left_color=blue!30, right_color=blue!60,_middle color=blue!10}

will be drawn on top_of_the cylinder end fill (which is done_in a behindbackgroundpath) even_though_the shading itself is_in a preaction.
It may be_possible to solve this with a_custom shape.
The_keys Cylinder_end shade and Cylinder body shade actually are implemented by setting_their content with \tikzset and using_\tikz@finish (similar how the_backgroundpath and_the_foregroundpath are applied).
Code
\documentclass[tikz]{standalone}
\usetikzlibrary{shapes.geometric}
\pgfset{
__Cylinder end_fill/.initial=,
  Cylinder body fill/.initial=,
  Cylinder_end shade