public Object getFromCache(String key) throws Exception {
		Object obj = null;
		Connection con = null;
		PreparedStatement pstmt = null;
		
		try {
			con = getConnection();

			pstmt = con.prepareStatement("SELECT DATA,EXPIRY_TIME_STAMP FROM DATA_CACHE WHERE  KEY = ?");
			int k = 1;
			pstmt.setString(k++, key);
			ResultSet rs = pstmt.executeQuery();

			java.sql.Timestamp expTime = null;
			if(rs.next()) {
				obj = rs.getObject("DATA");
				expTime = rs.getTimestamp("EXPIRY_TIME_STAMP");
			} else {
				if(QuickCached.DEBUG) logger.log(Level.FINE, "no value in db for key: {0}", key);
			}
			
			if (expTime != null && expTime.before(new Date())) {
				logger.log(Level.FINE, "Expired value for key {0}", key);
				obj = null;
			}
		} catch (Exception e) {
			logger.log(Level.WARNING, "Error: " + e, e);
			throw e;
		} finally {
			try {
				pstmt.close();
			} catch (SQLException e1) {
				logger.log(Level.WARNING, "Error: " + e1, e1);
			}
			try {
				con.close();
			} catch (SQLException e1) {
				logger.log(Level.WARNING, "Error: " + e1, e1);
			}
		}
		return obj;
	}