Similarly to Graham Chiu, I could not find any relevant articles on PubMed. I performed searches linking viral disease and caffeine, but most were related to viral hepatitis. Instead, I decided to address the question more broadly by investigating how caffeine affects the immune response. In short, caffeine suppresses immune signalling, meaning it is an anti-inflammatory, and is either helpful or harmful depending on your perspective.
Smith et al. (1997) recommend the opposite in their article "Caffeine and the common cold" after reporting benefit in psychomotor performance associated with the common cold.
Horrigan et al. (2006) found supression of neutrophil and monocyte chemical-directed movement, and lower levels of cytokines (e.g., TNF-a, IL-2, IFN, etc). They report supression of T lymphocyte activity and, as a consequence, antibody production by B lymphocytes - further supporting its role as an anti-inflammatory.
Dulson & Bishop (2016) found that caffeine does not effect activation of lymphocytes.
Al Reef & Ghanem (2018) report that caffeine suppresses the immune system by: preventing the replication of lymphocytes, supressing immune signalling (e.g., TNF-a, IL-2), and expression of immune receptors (e.g., the TLR family and MHC I); also high doses of caffeine impair macrophages and NK cells activity.
While it does suppress the immune system for a brief time this can provide benefits like relief from fever and pain, after all this is the same mechanism by which more commonly used drugs like paracetamol work.
Finally I would would like to show you this fascinating article from Wang et al. (2016) who investigated the immune effects of fasting on bacterial and viral illness. (As you know, fasting has potent anti-inflammatory effects.) They found that fasting was beneficial in bacterial illness but detrimental in viral infection.
I will leave you to draw your own conclusion from that, stay healthy!
Al Reef, T & Ghanem, E 2018, 'Caffeine: Well-known as psychotropic substance, but little as immunomodulator', Immunobiology, vol. 223, no. 12, Dec, pp. 818-25.
Dulson, DK & Bishop, NC 2016, 'Effect of a high and low dose of caffeine on human lymphocyte activation in response to antigen stimulation', Appl Physiol Nutr Metab, vol. 41, no. 2, Feb, pp. 224-7.
Horrigan, LA, Kelly, JP & Connor, TJ 2006, 'Immunomodulatory effects of caffeine: friend or foe?', Pharmacol Ther, vol. 111, no. 3, Sep, pp. 877-92.
Smith, A, Thomas, M, Perry, K & Whitney, H 1997, 'Caffeine and the common cold', J Psychopharmacol, vol. 11, no. 4, pp. 319-24.
Wang, A, Huen, SC, Luan, HH, Yu, S, Zhang, C, Gallezot, J-D, Booth, CJ & Medzhitov, R 2016, 'Opposing Effects of Fasting Metabolism on Tissue Tolerance in Bacterial and Viral Inflammation', Cell, vol. 166, no. 6, pp. 1512-25.e12.