public void service(ServletRequest request, ServletResponse response)
		{
			BigInteger i = extractFromRequest(request);
			BigInteger[] factors = null;
			
			synchronized(this) // NEW
			{
				hits++;
				
				// check-then-act
				if (i.equals(lastNumber))
				{
					cacheHits++;
					factors = lastFactors.clone();
				}
			}
			
			if (factors == null)
			{
				factors = factor(i); // not in synchronized block, expensive

				synchronized(this) // NEW
				{
					lastNumber = i;
					lastFactors = factors.clone();
				}
			}

			encodeIntoResponse(response, factors);
		}